Commit 7611aace authored by rmcilroy's avatar rmcilroy Committed by Commit bot

Don't apply pointer multipler to heap sizes on Android.

Android doesn't have swap space so if the heap goes over the physical memory
size the system will just kill us. Applying the Heap::kPointerMultipler
to heap size could cause the max heap size to be larger than physical memory.
Instead use the defaults which are based on actual physical memory configured
by Api::ConfigureDefaults().

BUG=432909
LOG=N

Review URL: https://codereview.chromium.org/960213007

Cr-Commit-Position: refs/heads/master@{#26954}
parent cbda41c8
......@@ -1086,7 +1086,13 @@ class Heap {
static const int kInitalOldGenerationLimitFactor = 2;
#if V8_OS_ANDROID
// Don't apply pointer multiplier on Android since it has no swap space and
// should instead adapt it's heap size based on available physical memory.
static const int kPointerMultiplier = 1;
#else
static const int kPointerMultiplier = i::kPointerSize / 4;
#endif
// The new space size has to be a power of 2. Sizes are in MB.
static const int kMaxSemiSpaceSizeLowMemoryDevice = 1 * kPointerMultiplier;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment