Reviewers: Hannes Payer,

Message:
Hannes: PTAL, thanks.  This is to fix crbug.com/432909

Description:
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

Please review this at https://codereview.chromium.org/960213007/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+6, -0 lines):
  M src/heap/heap.h


Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 0b353b70f1d269a79b747f65cedc23fc0d487958..943a30fc7abb03313e082a357da4014e545b0e54 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -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;


--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to