Chromium Code Reviews| 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); |