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

Unified Diff: runtime/vm/pages.h

Issue 578443003: Support old-space allocation in generated code (bump block only for now). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
Index: runtime/vm/pages.h
===================================================================
--- runtime/vm/pages.h (revision 40250)
+++ runtime/vm/pages.h (working copy)
@@ -306,8 +306,13 @@
// Attempt to allocate from bump block rather than normal freelist.
uword TryAllocateDataBump(intptr_t size, GrowthPolicy growth_policy);
uword TryAllocateDataBumpLocked(intptr_t size, GrowthPolicy growth_policy);
+ // Prefer small freelist blocks, then chip away at the bump block.
uword TryAllocatePromoLocked(intptr_t size, GrowthPolicy growth_policy);
+ // Bump block allocation from generated code.
+ uword* TopAddress() { return &bump_top_; }
+ uword* EndAddress() { return &bump_end_; }
+
private:
// Ids for time and data records in Heap::GCStats.
enum {
@@ -337,6 +342,8 @@
uword TryAllocateDataBumpInternal(intptr_t size,
GrowthPolicy growth_policy,
bool is_locked);
+ // Makes bump block walkable; do not call concurrently with mutator.
+ void MakeIterable() const;
HeapPage* AllocatePage(HeapPage::PageType type);
void FreePage(HeapPage* page, HeapPage* previous_page);
HeapPage* AllocateLargePage(intptr_t size, HeapPage::PageType type);
@@ -363,6 +370,7 @@
Heap* heap_;
+ // Use ExclusivePageIterator for safe access to these.
Mutex* pages_lock_;
HeapPage* pages_;
HeapPage* pages_tail_;
@@ -388,6 +396,7 @@
int64_t gc_time_micros_;
intptr_t collections_;
+ friend class ExclusivePageIterator;
friend class PageSpaceController;
friend class SweeperTask;

Powered by Google App Engine
This is Rietveld 408576698