ResourceConstraints* constraints) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
int new_space_size = constraints->max_new_space_size();
- int old_gen_size = constraints->max_old_space_size();
+ int old_space_size = constraints->max_old_space_size();
int max_executable_size = constraints->max_executable_size();
int code_range_size = constraints->code_range_size();
- if (new_space_size != 0 || old_gen_size != 0 || max_executable_size != 0 ||
+ if (new_space_size != 0 || old_space_size != 0 || max_executable_size != 0 ||
code_range_size != 0) {
// After initialization it's too late to change Heap constraints.
ASSERT(!isolate->IsInitialized());
bool result = isolate->heap()->ConfigureHeap(new_space_size / 2,
- old_gen_size,
+ old_space_size,
max_executable_size,
code_range_size);
if (!result) return false;
"always inline smi code in non-opt code")
// heap.cc
-DEFINE_int(max_new_space_size, 0, "max size of the new generation (in kBytes)")
-DEFINE_int(max_old_space_size, 0, "max size of the old generation (in Mbytes)")
+DEFINE_int(max_new_space_size, 0,
+ "max size of the new space consisting of two semi-spaces which are half"
+ "the size (in MBytes)")
+DEFINE_int(max_old_space_size, 0, "max size of the old space (in Mbytes)")
DEFINE_int(max_executable_size, 0, "max size of executable memory (in Mbytes)")
DEFINE_bool(gc_global, false, "always perform global GCs")
DEFINE_int(gc_interval, -1, "garbage collect after <n> allocations")
// and through the API, we should gracefully handle the case that the heap
// size is not big enough to fit all the initial objects.
bool Heap::ConfigureHeap(int max_semispace_size,
- intptr_t max_old_gen_size,
+ intptr_t max_old_space_size,
intptr_t max_executable_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;
+ max_semispace_size = (FLAG_max_new_space_size / 2) * kLumpOfMemory;
}
if (FLAG_max_old_space_size > 0) {
- max_old_gen_size = FLAG_max_old_space_size * kLumpOfMemory;
+ max_old_space_size = FLAG_max_old_space_size * kLumpOfMemory;
}
if (FLAG_max_executable_size > 0) {
max_executable_size = FLAG_max_executable_size * kLumpOfMemory;
reserved_semispace_size_ = max_semispace_size_;
}
- if (max_old_gen_size > 0) max_old_generation_size_ = max_old_gen_size;
+ if (max_old_space_size > 0) max_old_generation_size_ = max_old_space_size;
if (max_executable_size > 0) {
max_executable_size_ = RoundUp(max_executable_size, Page::kPageSize);
}
// Configure heap size before setup. Return false if the heap has been
// set up already.
bool ConfigureHeap(int max_semispace_size,
- intptr_t max_old_gen_size,
+ intptr_t max_old_space_size,
intptr_t max_executable_size,
intptr_t code_range_size);
bool ConfigureHeapDefault();
if (FLAG_stress_compaction) {
FLAG_force_marking_deque_overflows = true;
FLAG_gc_global = true;
- FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
+ FLAG_max_new_space_size = 2 * Page::kPageSize;
}
#ifdef V8_USE_DEFAULT_PLATFORM