• 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
..
heap-tester.h Loading commit data...
heap-utils.cc Loading commit data...
heap-utils.h Loading commit data...
test-alloc.cc Loading commit data...
test-array-buffer-tracker.cc Loading commit data...
test-compaction.cc Loading commit data...
test-concurrent-allocation.cc Loading commit data...
test-concurrent-marking.cc Loading commit data...
test-external-string-tracker.cc Loading commit data...
test-heap.cc Loading commit data...
test-incremental-marking.cc Loading commit data...
test-invalidated-slots.cc Loading commit data...
test-iterators.cc Loading commit data...
test-mark-compact.cc Loading commit data...
test-memory-measurement.cc Loading commit data...
test-page-promotion.cc Loading commit data...
test-shared-heap.cc Loading commit data...
test-spaces.cc Loading commit data...
test-unmapper.cc Loading commit data...
test-weak-references.cc Loading commit data...
test-write-barrier.cc Loading commit data...