[heap] Partially reland "Allow a minimum semi-space size of 512K."
This sets the minimum semi-space size to 512K, but does not
change the initial semi-space size.
This reverts commit 774a4c5e24
.
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
TBR=mlippautz@chromium.org
Change-Id: I1f5dd05b0851ba2b438bedcc023a5cf5f9242a81
Reviewed-on: https://chromium-review.googlesource.com/594107
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47016}
This commit is contained in:
parent
9a118af647
commit
7486dc3331
@ -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_(MB),
|
||||
initial_semispace_size_(1 * MB),
|
||||
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_ /
|
||||
|
@ -576,7 +576,7 @@ class Heap {
|
||||
|
||||
// Semi-space size needs to be a multiple of page size.
|
||||
static const int kMinSemiSpaceSizeInKB =
|
||||
2 * kPointerMultiplier * ((1 << kPageSizeBits) / KB);
|
||||
1 * kPointerMultiplier * ((1 << kPageSizeBits) / KB);
|
||||
static const int kMaxSemiSpaceSizeInKB =
|
||||
16 * kPointerMultiplier * ((1 << kPageSizeBits) / KB);
|
||||
|
||||
|
@ -66,10 +66,9 @@ TEST(Heap, SemiSpaceSize) {
|
||||
const size_t KB = static_cast<size_t>(i::KB);
|
||||
const size_t MB = static_cast<size_t>(i::MB);
|
||||
const size_t pm = i::Heap::kPointerMultiplier;
|
||||
ASSERT_EQ(1u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(0u) * KB);
|
||||
ASSERT_EQ(1u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(512u * MB) * KB);
|
||||
ASSERT_EQ(7u * pm * MB / 2,
|
||||
i::Heap::ComputeMaxSemiSpaceSize(1024u * MB) * KB);
|
||||
ASSERT_EQ(1u * pm * MB / 2, i::Heap::ComputeMaxSemiSpaceSize(0u) * KB);
|
||||
ASSERT_EQ(1u * pm * MB / 2, i::Heap::ComputeMaxSemiSpaceSize(512u * MB) * KB);
|
||||
ASSERT_EQ(3u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(1024u * MB) * KB);
|
||||
ASSERT_EQ(8u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(2024u * MB) * KB);
|
||||
ASSERT_EQ(8u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(4095u * MB) * KB);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user