Commit 036140dc authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] Limit size of semi space

FLAG_max_semi_space_size could be used to allow arbitrarily huge semi
spaces. Limit semi space size to kMaxSemiSpaceSize also in the case
this flag is used.

Change-Id: Id52cea6ef73eb1957265cf38c109dd490d7feccc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1725618Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62980}
parent b0801678
......@@ -4451,6 +4451,7 @@ void Heap::ConfigureHeap(const v8::ResourceConstraints& constraints) {
static_cast<size_t>(base::bits::RoundUpToPowerOfTwo64(
static_cast<uint64_t>(max_semi_space_size_)));
max_semi_space_size_ = Max(max_semi_space_size_, kMinSemiSpaceSize);
max_semi_space_size_ = Min(max_semi_space_size_, kMaxSemiSpaceSize);
max_semi_space_size_ = RoundDown<Page::kPageSize>(max_semi_space_size_);
}
......
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