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

Unified Diff: src/heap.h

Issue 9605014: Ignore soft heap limit when reserving space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | « no previous file | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index d205b9c96634f13663bdaf6578db3418f6f4dd74..e459d0cbcc41454e3a4a717c98f77a3f0e9103b6 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1044,6 +1044,14 @@ class Heap {
static const int kMakeHeapIterableMask = 1;
static const int kReduceMemoryFootprintMask = 2;
+ inline bool AbortIncrementalMarkingAndCollectGarbage(
Michael Starzinger 2012/03/07 15:52:42 Could we make this a static helper method in heap.
ulan 2012/03/07 16:04:30 Done.
+ AllocationSpace space, const char* gc_reason = NULL) {
+ mark_compact_collector()->SetFlags(kMakeHeapIterableMask);
+ bool result = CollectGarbage(space, gc_reason);
+ mark_compact_collector()->SetFlags(kNoGCFlags);
+ return result;
+ }
+
// Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is
// non-zero, then the slower precise sweeper is used, which leaves the heap
// in a state where we can iterate over the heap visiting all objects.
@@ -1342,6 +1350,10 @@ class Heap {
return old_gen_allocation_limit_ - PromotedTotalSize();
}
+ inline intptr_t OldGenerationCapacityAvailable() {
+ return max_old_generation_size_ - PromotedTotalSize();
+ }
+
static const intptr_t kMinimumPromotionLimit = 5 * Page::kPageSize;
static const intptr_t kMinimumAllocationLimit =
8 * (Page::kPageSize > MB ? Page::kPageSize : MB);
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698