Commit a5230d81 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Set initial semi-space size to 512K.

This is a partial reland of "Allow a minimum semi-space size of 512K."
with a heuristic to keep 1MB initial semi-space size for high
memory devices.

Original commit message:
> [heap] Allow a minimum semi-space size of 512K.
> This CL also reduces the minimum semi-space size to 512K.
> BUG=chromium:716032

BUG=chromium:735649,chromium:716032

Change-Id: I5ec851f2380c40dbc34b4576a668f63ae38ac898
Reviewed-on: https://chromium-review.googlesource.com/594387Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47065}
parent 5572a6ec
......@@ -87,7 +87,7 @@ Heap::Heap()
// semispace_size_ should be a power of 2 and old_generation_size_ should
// be a multiple of Page::kPageSize.
max_semi_space_size_(8 * (kPointerSize / 4) * MB),
initial_semispace_size_(1 * MB),
initial_semispace_size_(kMinSemiSpaceSizeInKB * KB),
max_old_generation_size_(700ul * (kPointerSize / 4) * MB),
initial_max_old_generation_size_(max_old_generation_size_),
initial_old_generation_size_(max_old_generation_size_ /
......@@ -5497,6 +5497,12 @@ bool Heap::ConfigureHeap(size_t max_semi_space_size_in_kb,
max_semi_space_size_ = base::bits::RoundUpToPowerOfTwo32(
static_cast<uint32_t>(max_semi_space_size_));
if (max_semi_space_size_ == kMaxSemiSpaceSizeInKB * KB) {
// Start with at least 1*MB semi-space on machines with a lot of memory.
initial_semispace_size_ =
Max(initial_semispace_size_, static_cast<size_t>(1 * MB));
}
if (FLAG_min_semi_space_size > 0) {
size_t initial_semispace_size =
static_cast<size_t>(FLAG_min_semi_space_size) * MB;
......
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