summaryrefslogtreecommitdiffstats
path: root/V8Binding/v8
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-07-20 15:05:22 -0700
committerFeng Qian <fqian@google.com>2009-07-20 15:12:50 -0700
commitce39e03a248f9bee3e746c15e7961b3e40a871ed (patch)
tree046588f7566f59d95e184cf450069460a738759b /V8Binding/v8
parentd9b05e1bdfacb95665c50c181cbfd6daca729fab (diff)
downloadexternal_webkit-ce39e03a248f9bee3e746c15e7961b3e40a871ed.zip
external_webkit-ce39e03a248f9bee3e746c15e7961b3e40a871ed.tar.gz
external_webkit-ce39e03a248f9bee3e746c15e7961b3e40a871ed.tar.bz2
Experiment a different GC policy.
Smaller promotion limit makes mark-compact GC more often, but may use less memory.
Diffstat (limited to 'V8Binding/v8')
-rw-r--r--V8Binding/v8/src/heap.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/V8Binding/v8/src/heap.cc b/V8Binding/v8/src/heap.cc
index 907c571..64059b1 100644
--- a/V8Binding/v8/src/heap.cc
+++ b/V8Binding/v8/src/heap.cc
@@ -56,8 +56,13 @@ MapSpace* Heap::map_space_ = NULL;
CellSpace* Heap::cell_space_ = NULL;
LargeObjectSpace* Heap::lo_space_ = NULL;
+#if defined(ANDROID)
+static const int kMinimumPromotionLimit = 1*MB;
+static const int kMinimumAllocationLimit = 2*MB;
+#else
static const int kMinimumPromotionLimit = 2*MB;
static const int kMinimumAllocationLimit = 8*MB;
+#endif
int Heap::old_gen_promotion_limit_ = kMinimumPromotionLimit;
int Heap::old_gen_allocation_limit_ = kMinimumAllocationLimit;