[heap] Skip pages marked as never-allocate in sweeper accounting
This is a more general fix than 84435fa
because tests that rely on
the sweeping order mark all unwanted pages as never-allocate using
SealCurrentObjects.
Bug: v8:9205
Change-Id: I261de3183ee38189ed72de28883a4fdf7b6f253d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1605728
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61407}
This commit is contained in:
parent
bf07d7905a
commit
6644f2b872
@ -393,10 +393,9 @@ int Sweeper::ParallelSweepSpace(AllocationSpace identity,
|
||||
Page* page = nullptr;
|
||||
while ((page = GetSweepingPageSafe(identity)) != nullptr) {
|
||||
int freed = ParallelSweepPage(page, identity);
|
||||
if (!page->NeverEvacuate()) {
|
||||
// Pages are marked as never-evacuate after deserialization. They have
|
||||
// no free space. Do not account them towards the |max_pages| limit.
|
||||
pages_freed += 1;
|
||||
if (page->IsFlagSet(Page::NEVER_ALLOCATE_ON_PAGE)) {
|
||||
// Free list of a never-allocate page will be dropped later on.
|
||||
continue;
|
||||
}
|
||||
DCHECK_GE(freed, 0);
|
||||
max_freed = Max(max_freed, freed);
|
||||
|
Loading…
Reference in New Issue
Block a user