Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1678)

Unified Diff: vm/pages.h

Issue 11186013: - Do not bump allocate in old-space pages. Always use (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/gc_sweeper.cc ('k') | vm/pages.cc » ('j') | vm/pages.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « vm/gc_sweeper.cc ('k') | vm/pages.cc » ('j') | vm/pages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698