| 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;
|
|
|