Index: src/heap.cc |
=================================================================== |
--- src/heap.cc (revision 5755) |
+++ src/heap.cc (working copy) |
@@ -79,22 +79,31 @@ |
// semispace_size_ should be a power of 2 and old_generation_size_ should be |
// a multiple of Page::kPageSize. |
#if defined(ANDROID) |
-int Heap::max_semispace_size_ = 2*MB; |
+static const int default_max_semispace_size = 2*MB; |
intptr_t Heap::max_old_generation_size_ = 192*MB; |
int Heap::initial_semispace_size_ = 128*KB; |
intptr_t Heap::code_range_size_ = 0; |
#elif defined(V8_TARGET_ARCH_X64) |
-int Heap::max_semispace_size_ = 16*MB; |
+static const int default_max_semispace_size = 16*MB; |
intptr_t Heap::max_old_generation_size_ = 1*GB; |
int Heap::initial_semispace_size_ = 1*MB; |
intptr_t Heap::code_range_size_ = 512*MB; |
#else |
-int Heap::max_semispace_size_ = 8*MB; |
+static const int default_max_semispace_size = 8*MB; |
intptr_t Heap::max_old_generation_size_ = 512*MB; |
int Heap::initial_semispace_size_ = 512*KB; |
intptr_t Heap::code_range_size_ = 0; |
#endif |
+// Give the platform a chance to modify max_semispace_size_. |
+// This helps / allows platforms that have the available memory footprint |
+// to vary their NEW SPACE sizes beyond the default settings provided. |
+#if defined(PLATFORM_SPECIFIC_MAX_SEMISPACE_SIZE) |
Mads Ager (chromium)
2010/11/15 08:43:04
Let's just call this V8_MAX_SEMISPACE_SIZE. I woul
Mads Ager (chromium)
2010/11/15 10:00:56
I take this part back. You can't since this is an
|
+int Heap::max_semispace_size_ = PLATFORM_SPECIFIC_MAX_SEMISPACE_SIZE; |
+#else |
+int Heap::max_semispace_size_ = default_max_semispace_size; |
+#endif |
+ |
// The snapshot semispace size will be the default semispace size if |
// snapshotting is used and will be the requested semispace size as |
// set up by ConfigureHeap otherwise. |