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

Unified Diff: src/heap.cc

Issue 262653002: When maximum space size flags are set, overwrite the resource constraints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months 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
diff --git a/src/heap.cc b/src/heap.cc
index ca7cea5ac17ec8ae2f3a109ca29e05423a1edb3c..c764b31b395efdb95cf861a652bf9dbabf0a21c5 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -5014,6 +5014,17 @@ bool Heap::ConfigureHeap(int max_semispace_size,
intptr_t code_range_size) {
if (HasBeenSetUp()) return false;
+ // If max space size flags are specified overwrite the configuration.
+ if (FLAG_max_new_space_size > 0) {
+ max_semispace_size = FLAG_max_new_space_size * kLumpOfMemory;
+ }
+ if (FLAG_max_old_space_size > 0) {
+ max_old_gen_size = FLAG_max_old_space_size * kLumpOfMemory;
+ }
+ if (FLAG_max_executable_size > 0) {
+ max_executable_size = FLAG_max_executable_size * kLumpOfMemory;
+ }
+
if (FLAG_stress_compaction) {
// This will cause more frequent GCs when stressing.
max_semispace_size_ = Page::kPageSize;
« 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