Chromium Code Reviews| Index: vm/pages.h |
| =================================================================== |
| --- vm/pages.h (revision 13711) |
| +++ vm/pages.h (working copy) |
| @@ -31,9 +31,6 @@ |
| uword start() const { return reinterpret_cast<uword>(this); } |
| uword end() const { return memory_->end(); } |
| - uword top() const { return top_; } |
| - void set_top(uword top) { top_ = top; } |
| - |
| uword first_object_start() const { |
| return (reinterpret_cast<uword>(this) + sizeof(HeapPage)); |
| } |
| @@ -44,16 +41,6 @@ |
| used_ += size; |
| } |
| - uword TryBumpAllocate(intptr_t size) { |
| - uword result = top(); |
| - intptr_t remaining_space = end() - result; |
| - if (remaining_space < size) { |
| - return 0; |
| - } |
| - set_top(result + size); |
| - return result; |
| - } |
| - |
| void VisitObjects(ObjectVisitor* visitor) const; |
| void VisitObjectPointers(ObjectPointerVisitor* visitor) const; |
| @@ -72,7 +59,7 @@ |
| VirtualMemory* memory_; |
| HeapPage* next_; |
| uword used_; |
| - uword top_; |
| + uword alignment_; // Needed to allocate old objects with kOldObjectAlignment. |
|
cshapiro
2012/10/17 02:53:22
This is a bit confusing. Is this member reference
Ivan Posva
2012/10/18 17:34:21
It is padding, which I tried to convey with the na
|
| friend class PageSpace; |
| @@ -216,7 +203,7 @@ |
| private: |
| static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage); |
| - void AllocatePage(); |
| + HeapPage* AllocatePage(); |
| void FreePage(HeapPage* page, HeapPage* previous_page); |
| HeapPage* AllocateLargePage(intptr_t size); |
| void FreeLargePage(HeapPage* page, HeapPage* previous_page); |
| @@ -229,8 +216,6 @@ |
| return increase <= (max_capacity_ - capacity_); |
| } |
| - uword TryBumpAllocate(intptr_t size); |
| - |
| FreeList freelist_; |
| Heap* heap_; |
| @@ -241,13 +226,6 @@ |
| PeerTable peer_table_; |
| - // Page being used for bump allocation. |
| - // The value has different meanings: |
| - // NULL: Still bump allocating from last allocated fresh page. |
| - // !NULL: Last page that had enough room to bump allocate, when we reach the |
| - // tail page, we give up bump allocating. |
| - HeapPage* bump_page_; |
| - |
| // Various sizes being tracked for this generation. |
| intptr_t max_capacity_; |
| intptr_t capacity_; |