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

Unified Diff: runtime/vm/pages.h

Issue 511963007: Pretenure some strings into bump-allocated block (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 39651)
+++ runtime/vm/pages.h (working copy)
@@ -303,6 +303,9 @@
tasks_ = val;
}
+ // Attempt to allocate from bump block rather than normal freelist.
+ uword TryAllocateDataBump(intptr_t size, GrowthPolicy growth_policy);
+
private:
// Ids for time and data records in Heap::GCStats.
enum {
@@ -325,6 +328,10 @@
GrowthPolicy growth_policy,
bool is_protected,
bool is_locked);
+ uword TryAllocateInNewPage(intptr_t size,
+ HeapPage::PageType type,
+ GrowthPolicy growth_policy,
+ bool is_locked);
HeapPage* AllocatePage(HeapPage::PageType type);
void FreePage(HeapPage* page, HeapPage* previous_page);
HeapPage* AllocateLargePage(intptr_t size, HeapPage::PageType type);
@@ -358,6 +365,11 @@
HeapPage* exec_pages_tail_;
HeapPage* large_pages_;
+ // A block of memory in a data page, managed by bump allocation. The remainder
+ // is kept formatted as a FreeListElement, but is not in any freelist.
+ uword bump_top_;
+ uword bump_end_;
+
// Various sizes being tracked for this generation.
intptr_t max_capacity_in_words_;
SpaceUsage usage_;

Powered by Google App Engine
This is Rietveld 408576698