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

Unified Diff: src/heap/heap.h

Issue 2895473003: [heap] Simplify and scale ResourceConstraints::ConfigureDefaults. (Closed)
Patch Set: Created 3 years, 7 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 | « src/api.cc ('k') | src/zone/accounting-allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index a1cb4d22bef229aef7dffe7ce85807a1791c0733..24096e2cb118708fe4fc36d82a1c60cc65babc43 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -614,18 +614,13 @@ class Heap {
#endif
// The new space size has to be a power of 2. Sizes are in MB.
- static const int kMaxSemiSpaceSizeLowMemoryDevice = 1 * kPointerMultiplier;
- static const int kMaxSemiSpaceSizeMediumMemoryDevice = 4 * kPointerMultiplier;
- static const int kMaxSemiSpaceSizeHighMemoryDevice = 8 * kPointerMultiplier;
- static const int kMaxSemiSpaceSizeHugeMemoryDevice = 8 * kPointerMultiplier;
+ static const int kMinSemiSpaceSize = 1 * kPointerMultiplier;
+ static const int kMaxSemiSpaceSize = 8 * kPointerMultiplier;
// The old space size has to be a multiple of Page::kPageSize.
// Sizes are in MB.
- static const int kMaxOldSpaceSizeLowMemoryDevice = 128 * kPointerMultiplier;
- static const int kMaxOldSpaceSizeMediumMemoryDevice =
- 256 * kPointerMultiplier;
- static const int kMaxOldSpaceSizeHighMemoryDevice = 512 * kPointerMultiplier;
- static const int kMaxOldSpaceSizeHugeMemoryDevice = 1024 * kPointerMultiplier;
+ static const int kMinOldSpaceSize = 128 * kPointerMultiplier;
+ static const int kMaxOldSpaceSize = 1024 * kPointerMultiplier;
static const int kTraceRingBufferSize = 512;
static const int kStacktraceBufferSize = 512;
@@ -951,10 +946,12 @@ class Heap {
bool ShouldOptimizeForMemoryUsage();
bool IsLowMemoryDevice() {
+ const int kMaxOldSpaceSizeLowMemoryDevice = 128 * kPointerMultiplier;
Hannes Payer (out of office) 2017/05/19 11:39:57 I will remove these two methods in a follow-up CL.
return max_old_generation_size_ <= kMaxOldSpaceSizeLowMemoryDevice;
}
bool IsMemoryConstrainedDevice() {
+ const int kMaxOldSpaceSizeMediumMemoryDevice = 256 * kPointerMultiplier;
return max_old_generation_size_ <= kMaxOldSpaceSizeMediumMemoryDevice;
}
« no previous file with comments | « src/api.cc ('k') | src/zone/accounting-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698