| Index: src/spaces.cc
|
| ===================================================================
|
| --- src/spaces.cc (revision 5541)
|
| +++ src/spaces.cc (working copy)
|
| @@ -270,9 +270,9 @@
|
| // -----------------------------------------------------------------------------
|
| // MemoryAllocator
|
| //
|
| -int MemoryAllocator::capacity_ = 0;
|
| -int MemoryAllocator::size_ = 0;
|
| -int MemoryAllocator::size_executable_ = 0;
|
| +intptr_t MemoryAllocator::capacity_ = 0;
|
| +intptr_t MemoryAllocator::size_ = 0;
|
| +intptr_t MemoryAllocator::size_executable_ = 0;
|
|
|
| List<MemoryAllocator::MemoryAllocationCallbackRegistration>
|
| MemoryAllocator::memory_allocation_callbacks_;
|
| @@ -302,7 +302,7 @@
|
| }
|
|
|
|
|
| -bool MemoryAllocator::Setup(int capacity) {
|
| +bool MemoryAllocator::Setup(intptr_t capacity) {
|
| capacity_ = RoundUp(capacity, Page::kPageSize);
|
|
|
| // Over-estimate the size of chunks_ array. It assumes the expansion of old
|
| @@ -691,7 +691,9 @@
|
| #ifdef DEBUG
|
| void MemoryAllocator::ReportStatistics() {
|
| float pct = static_cast<float>(capacity_ - size_) / capacity_;
|
| - PrintF(" capacity: %d, used: %d, available: %%%d\n\n",
|
| + PrintF(" capacity: %" V8_PTR_PREFIX "d"
|
| + ", used: %" V8_PTR_PREFIX "d"
|
| + ", available: %%%d\n\n",
|
| capacity_, size_, static_cast<int>(pct*100));
|
| }
|
| #endif
|
| @@ -769,7 +771,7 @@
|
| // -----------------------------------------------------------------------------
|
| // PagedSpace implementation
|
|
|
| -PagedSpace::PagedSpace(int max_capacity,
|
| +PagedSpace::PagedSpace(intptr_t max_capacity,
|
| AllocationSpace id,
|
| Executability executable)
|
| : Space(id, executable) {
|
| @@ -1643,7 +1645,8 @@
|
| #ifdef DEBUG
|
| if (FLAG_heap_stats) {
|
| float pct = static_cast<float>(Available()) / Capacity();
|
| - PrintF(" capacity: %d, available: %d, %%%d\n",
|
| + PrintF(" capacity: %" V8_PTR_PREFIX "d"
|
| + ", available: %" V8_PTR_PREFIX "d, %%%d\n",
|
| Capacity(), Available(), static_cast<int>(pct*100));
|
| PrintF("\n Object Histogram:\n");
|
| for (int i = 0; i <= LAST_TYPE; i++) {
|
| @@ -2402,7 +2405,9 @@
|
|
|
| void OldSpace::ReportStatistics() {
|
| int pct = Available() * 100 / Capacity();
|
| - PrintF(" capacity: %d, waste: %d, available: %d, %%%d\n",
|
| + PrintF(" capacity: %" V8_PTR_PREFIX "d"
|
| + ", waste: %" V8_PTR_PREFIX "d"
|
| + ", available: %" V8_PTR_PREFIX "d, %%%d\n",
|
| Capacity(), Waste(), Available(), pct);
|
|
|
| ClearHistograms();
|
| @@ -2559,7 +2564,9 @@
|
| #ifdef DEBUG
|
| void FixedSpace::ReportStatistics() {
|
| int pct = Available() * 100 / Capacity();
|
| - PrintF(" capacity: %d, waste: %d, available: %d, %%%d\n",
|
| + PrintF(" capacity: %" V8_PTR_PREFIX "d"
|
| + ", waste: %" V8_PTR_PREFIX "d"
|
| + ", available: %" V8_PTR_PREFIX "d, %%%d\n",
|
| Capacity(), Waste(), Available(), pct);
|
|
|
| ClearHistograms();
|
| @@ -3011,7 +3018,7 @@
|
|
|
|
|
| void LargeObjectSpace::ReportStatistics() {
|
| - PrintF(" size: %d\n", size_);
|
| + PrintF(" size: %" V8_PTR_PREFIX "d\n", size_);
|
| int num_objects = 0;
|
| ClearHistograms();
|
| LargeObjectIterator it(this);
|
|
|