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

Unified Diff: src/heap.cc

Issue 4937001: Make the max_semispace_size parameter customizable on a PLATFORM basis.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698