[heap] Allow semi space sizes above kMaxSemiSpaceSize
Maximum semispace size was capped at kMaxSemiSpaceSize. Also allow non-power-of-2 sizes. Change-Id: I3385674a13455b47802a3f6e62ac5b9ed3987264 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1962863 Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#65445}
This commit is contained in:
parent
3d64fa8edc
commit
7109150ad0
@ -4468,14 +4468,7 @@ void Heap::ConfigureHeap(const v8::ResourceConstraints& constraints) {
|
||||
// This will cause more frequent GCs when stressing.
|
||||
max_semi_space_size_ = MB;
|
||||
}
|
||||
// The new space size must be a power of two to support single-bit testing
|
||||
// for containment.
|
||||
// TODO(ulan): Rounding to a power of 2 is not longer needed. Remove it.
|
||||
max_semi_space_size_ =
|
||||
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_);
|
||||
}
|
||||
|
||||
|
@ -2245,8 +2245,6 @@ NewSpace::NewSpace(Heap* heap, v8::PageAllocator* page_allocator,
|
||||
to_space_(heap, kToSpace),
|
||||
from_space_(heap, kFromSpace) {
|
||||
DCHECK(initial_semispace_capacity <= max_semispace_capacity);
|
||||
DCHECK(
|
||||
base::bits::IsPowerOfTwo(static_cast<uint32_t>(max_semispace_capacity)));
|
||||
|
||||
to_space_.SetUp(initial_semispace_capacity, max_semispace_capacity);
|
||||
from_space_.SetUp(initial_semispace_capacity, max_semispace_capacity);
|
||||
|
@ -415,8 +415,8 @@ KNOWN_OBJECTS = {
|
||||
|
||||
# Lower 32 bits of first page addresses for various heap spaces.
|
||||
HEAP_FIRST_PAGES = {
|
||||
0x08180000: "old_space",
|
||||
0x081c0000: "map_space",
|
||||
0x08100000: "old_space",
|
||||
0x08140000: "map_space",
|
||||
0x08040000: "read_only_space",
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user