| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 574481bd39326828eee08412d45d41a3900024cd..0364a8e16fac6d213016ad95692e3775fcf406c5 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -634,6 +634,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.
|
| @@ -1120,8 +1124,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_; }
|
| @@ -1227,13 +1237,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;
|
|
|
| @@ -1636,6 +1645,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
|
| + // 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_;
|
|
|