| Index: src/heap.h
|
| diff --git a/src/heap.h b/src/heap.h
|
| index 63a05c73e49988c5aee31b8ad4447373219cc3a7..523dd81aa0811d0b3945bfa2d55bc651c4aef166 100644
|
| --- a/src/heap.h
|
| +++ b/src/heap.h
|
| @@ -1074,23 +1074,9 @@ class Heap {
|
| 700 * kPointerMultiplier;
|
|
|
| intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) {
|
| - intptr_t limit;
|
| - if (FLAG_stress_compaction) {
|
| - limit = old_gen_size + old_gen_size / 10;
|
| - } else if (old_gen_size < max_old_generation_size_ / 8) {
|
| - if (max_old_generation_size_ <= kMaxOldSpaceSizeMediumMemoryDevice) {
|
| - limit = old_gen_size * 2;
|
| - } else {
|
| - limit = old_gen_size * 4;
|
| - }
|
| - } else if (old_gen_size < max_old_generation_size_ / 4) {
|
| - limit = static_cast<intptr_t>(old_gen_size * 1.5);
|
| - } else if (old_gen_size < max_old_generation_size_ / 2) {
|
| - limit = static_cast<intptr_t>(old_gen_size * 1.2);
|
| - } else {
|
| - limit = static_cast<intptr_t>(old_gen_size * 1.1);
|
| - }
|
| -
|
| + intptr_t limit = FLAG_stress_compaction
|
| + ? old_gen_size + old_gen_size / 10
|
| + : old_gen_size * old_space_growing_factor_;
|
| limit = Max(limit, kMinimumOldGenerationAllocationLimit);
|
| limit += new_space_.Capacity();
|
| intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
|
| @@ -1515,6 +1501,11 @@ class Heap {
|
| intptr_t max_executable_size_;
|
| intptr_t maximum_committed_;
|
|
|
| + // The old space growing factor is used in the old space heap growing
|
| + // strategy. The new old space size is the current old space size times
|
| + // old_space_growing_factor_.
|
| + int old_space_growing_factor_;
|
| +
|
| // For keeping track of how much data has survived
|
| // scavenge since last new space expansion.
|
| int survived_since_last_expansion_;
|
|
|