Index: src/heap/heap.h |
diff --git a/src/heap/heap.h b/src/heap/heap.h |
index f39b89393346a148abac7c9283f09f695311ad41..e15c1f37e77dfa3dd43b61ed0c2125e93c871c7c 100644 |
--- a/src/heap/heap.h |
+++ b/src/heap/heap.h |
@@ -519,9 +519,6 @@ class Heap { |
}; |
typedef List<Chunk> Reservation; |
- static const intptr_t kMinimumOldGenerationAllocationLimit = |
- 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); |
- |
static const int kInitalOldGenerationLimitFactor = 2; |
#if V8_OS_ANDROID |
@@ -1803,6 +1800,15 @@ class Heap { |
void SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed, |
double mutator_speed); |
+ intptr_t MinimumAllocationLimitGrowingStep() { |
+ const double kRegularAllocationLimitGrowingStep = 8; |
+ const double kLowMemoryAllocationLimitGrowingStep = 2; |
+ intptr_t limit = (Page::kPageSize > MB ? Page::kPageSize : MB); |
+ return limit * (ShouldOptimizeForMemoryUsage() |
+ ? kLowMemoryAllocationLimitGrowingStep |
+ : kRegularAllocationLimitGrowingStep); |
+ } |
+ |
// =========================================================================== |
// Idle notification. ======================================================== |
// =========================================================================== |