Chromium Code Reviews| Index: src/heap/heap.h |
| diff --git a/src/heap/heap.h b/src/heap/heap.h |
| index 0b353b70f1d269a79b747f65cedc23fc0d487958..8e95f61939e07c583454e112ed7bcc6ea6e7562f 100644 |
| --- a/src/heap/heap.h |
| +++ b/src/heap/heap.h |
| @@ -628,6 +628,10 @@ class Heap { |
| // Returns of size of all objects residing in the heap. |
| intptr_t SizeOfObjects(); |
| + intptr_t old_generation_allocation_limit() const { |
| + return old_generation_allocation_limit_; |
| + } |
| + |
| // Return the starting address and a mask for the new space. And-masking an |
| // address with the mask will result in the start address of the new space |
| // for all addresses in either semispace. |
| @@ -1112,8 +1116,14 @@ class Heap { |
| static const int kMaxExecutableSizeHugeMemoryDevice = |
| 256 * kPointerMultiplier; |
| - intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size, |
| - int freed_global_handles); |
| + // Calculates the allocation limit based on a given growing factor and a |
| + // given old generation size. |
| + intptr_t CalculateOldGenerationAllocationLimit(double factor, |
| + intptr_t old_gen_size); |
| + |
| + // Sets the allocation limit to trigger the next full garbage collection. |
| + void SetOldGenerationAllocationLimit(intptr_t old_gen_size, |
| + int freed_global_handles); |
| // Indicates whether inline bump-pointer allocation has been disabled. |
| bool inline_allocation_disabled() { return inline_allocation_disabled_; } |
| @@ -1219,13 +1229,12 @@ class Heap { |
| survived_since_last_expansion_ += survived; |
| } |
| - inline bool NextGCIsLikelyToBeFull() { |
| + inline bool NextGCIsLikelyToBeFull(intptr_t limit) { |
| if (FLAG_gc_global) return true; |
| if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true; |
| - intptr_t adjusted_allocation_limit = |
| - old_generation_allocation_limit_ - new_space_.Capacity(); |
| + intptr_t adjusted_allocation_limit = limit - new_space_.Capacity(); |
| if (PromotedTotalSize() >= adjusted_allocation_limit) return true; |
| @@ -1604,6 +1613,10 @@ class Heap { |
| // generation and on every allocation in large object space. |
| intptr_t old_generation_allocation_limit_; |
| + // The allocation limit when there is >16.66ms idle time in the idle time |
|
rmcilroy
2015/04/23 13:39:58
when there is > kMinIdleTimeToStartIncrementalMark
Hannes Payer (out of office)
2015/04/23 13:51:33
Done.
|
| + // handler. |
| + intptr_t idle_old_generation_allocation_limit_; |
| + |
| // Indicates that an allocation has failed in the old generation since the |
| // last GC. |
| bool old_gen_exhausted_; |