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

Unified Diff: src/heap/heap.cc

Issue 657583004: Start with a maximally large new space reservation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | test/cctest/cctest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 65b3bed357d00153cbbaa65dcf9dc000532d4737..d5d0dd9bc199e24cae244c2109693d9311dd28f2 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -59,7 +59,7 @@ Heap::Heap()
// be a multiple of Page::kPageSize.
reserved_semispace_size_(8 * (kPointerSize / 4) * MB),
max_semi_space_size_(8 * (kPointerSize / 4) * MB),
- initial_semispace_size_(Page::kPageSize),
+ initial_semispace_size_(8 * (kPointerSize / 4) * MB),
max_old_generation_size_(700ul * (kPointerSize / 4) * MB),
max_executable_size_(256ul * (kPointerSize / 4) * MB),
// Variables set based on semispace_size_ and old_generation_size_ in
@@ -139,7 +139,8 @@ Heap::Heap()
// V8 with snapshots and a non-default max semispace size is much
// easier if you can define it as part of the build environment.
#if defined(V8_MAX_SEMISPACE_SIZE)
- max_semi_space_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE;
+ initial_semispace_size_ = max_semi_space_size_ = reserved_semispace_size_ =
+ V8_MAX_SEMISPACE_SIZE;
#endif
// Ensure old_generation_size_ is a multiple of kPageSize.
@@ -4939,9 +4940,12 @@ bool Heap::ConfigureHeap(int max_semi_space_size, int max_old_space_size,
} else {
initial_semispace_size_ = initial_semispace_size;
}
+ initial_semispace_size_ =
+ Min(initial_semispace_size_, max_semi_space_size_);
+ } else {
+ initial_semispace_size_ = max_semi_space_size_;
}
- initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_);
// The old generation is paged and needs at least one page for each space.
int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
« no previous file with comments | « no previous file | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698