| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 7493c808b8e1f7da28fb76387ba31d7e1fe5a7da..f39b89393346a148abac7c9283f09f695311ad41 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -563,6 +563,7 @@ class Heap {
|
| static const double kMaxHeapGrowingFactor;
|
| static const double kMaxHeapGrowingFactorMemoryConstrained;
|
| static const double kMaxHeapGrowingFactorIdle;
|
| + static const double kConservativeHeapGrowingFactor;
|
| static const double kTargetMutatorUtilization;
|
|
|
| static const int kNoGCFlags = 0;
|
| @@ -888,11 +889,18 @@ class Heap {
|
| bool HasHighFragmentation();
|
| bool HasHighFragmentation(intptr_t used, intptr_t committed);
|
|
|
| - void SetOptimizeForLatency() { optimize_for_memory_usage_ = false; }
|
| - void SetOptimizeForMemoryUsage();
|
| - bool ShouldOptimizeForMemoryUsage() {
|
| - return optimize_for_memory_usage_ || HighMemoryPressure();
|
| + void ActivateMemoryReducerIfNeeded();
|
| +
|
| + bool ShouldOptimizeForMemoryUsage();
|
| +
|
| + bool IsLowMemoryDevice() {
|
| + return max_old_generation_size_ <= kMaxOldSpaceSizeLowMemoryDevice;
|
| + }
|
| +
|
| + bool IsMemoryConstrainedDevice() {
|
| + return max_old_generation_size_ <= kMaxOldSpaceSizeMediumMemoryDevice;
|
| }
|
| +
|
| bool HighMemoryPressure() {
|
| return memory_pressure_level_.Value() != MemoryPressureLevel::kNone;
|
| }
|
| @@ -2119,10 +2127,6 @@ class Heap {
|
| // last GC.
|
| bool old_gen_exhausted_;
|
|
|
| - // Indicates that memory usage is more important than latency.
|
| - // TODO(ulan): Merge it with memory reducer once chromium:490559 is fixed.
|
| - bool optimize_for_memory_usage_;
|
| -
|
| // Indicates that inline bump-pointer allocation has been globally disabled
|
| // for all spaces. This is used to disable allocations in generated code.
|
| bool inline_allocation_disabled_;
|
|
|