Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 4f5a064cca37a0f51ce644a815da5786008d664a..afe7e38726207a63e7c917fafe4202504e62a5f2 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -5672,7 +5672,7 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size, |
double mutator_speed, |
int freed_global_handles) { |
const int kFreedGlobalHandlesThreshold = 700; |
- const double kMaxHeapGrowingFactorForManyFreedGlobalHandles = 1.3; |
+ const double kConservativeHeapGrowingFactor = 1.3; |
double factor = HeapGrowingFactor(gc_speed, mutator_speed); |
@@ -5691,8 +5691,9 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size, |
factor = Min(factor, kMaxHeapGrowingFactorMemoryConstrained); |
} |
- if (freed_global_handles >= kFreedGlobalHandlesThreshold) { |
- factor = Min(factor, kMaxHeapGrowingFactorForManyFreedGlobalHandles); |
+ if (freed_global_handles >= kFreedGlobalHandlesThreshold || |
+ memory_reducer_.ShouldGrowHeapSlowly()) { |
+ factor = Min(factor, kConservativeHeapGrowingFactor); |
} |
if (FLAG_stress_compaction || |