[heap] Double the max new space capacity for MinorMC

The code still mostly refers to semi spaces when computing sizes.
This will be renamed at a later date.

Bug: v8:12612
Change-Id: Ib8f972493332425e971a35b0b892630a627810c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4188382
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85536}
This commit is contained in:
Omer Katz 2023-01-23 17:24:57 +01:00 committed by V8 LUCI CQ
parent 2dd722b936
commit a7c83d5515

View File

@ -4894,6 +4894,13 @@ void Heap::ConfigureHeap(const v8::ResourceConstraints& constraints) {
max_semi_space_size_ =
SemiSpaceSizeFromYoungGenerationSize(young_generation_size);
}
if (v8_flags.minor_mc) {
// The conditions above this one assume a new space implementation
// consisting of two equally sized semi spaces. If MinorMC is used, new
// space contains only a single space. Thus max size can be doubled
// without regressing memory.
max_semi_space_size_ *= 2;
}
if (v8_flags.stress_compaction) {
// This will cause more frequent GCs when stressing.
max_semi_space_size_ = MB;