• Omer Katz's avatar
    [heap] Fix PagedNewSpace initialization · 262d5fc3
    Omer Katz authored
    Whenever PagedNewSpace allocates a page, the page is added to the free
    list. Preallocating pages on space initialization means the pages are
    added to the free list before the map for free space is initialized.
    Then, when allocating from the free list, a DCHECK fails
    (free-list.cc:508).
    
    This CL delays page preallocation until `EnsureCurrentCapacity` is
    called. When using PagedNewSpace, we will call this method from
    `Heap::CreateHeapObjects` after the maps are allocated and before any
    allocations in new space are attempted.
    
    Bug: v8:12612
    Change-Id: I33f825ddd831640b12e4c0f7b849262a335df51e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780541Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Omer Katz <omerkatz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#81919}
    262d5fc3
Name
Last commit
Last update
..
benchmarks Loading commit data...
bigint Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...