Commit 25e79809 authored by hpayer@chromium.org's avatar hpayer@chromium.org

When maximum space size flags are set, overwrite the resource constraints.

BUG=
R=rmcilroy@chromium.org

Review URL: https://codereview.chromium.org/262653002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d8ad2dd5
......@@ -4986,6 +4986,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment