Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: src/heap/heap.cc

Issue 1261373006: Grow heap slowly after running memory reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/memory-reducer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ||
« no previous file with comments | « no previous file | src/heap/memory-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698