Commit 4e4def64 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Do not select never allocate pages as evacuation candidates

TBR=ulan@chromium.org

Change-Id: I793d99ec5b82d2f2444a20db5f0eb4e08bea4da4
Reviewed-on: https://chromium-review.googlesource.com/645308Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47737}
parent 47efa29a
......@@ -834,7 +834,9 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) {
? nullptr
: Page::FromAllocationAreaAddress(space->top());
for (Page* p : *space) {
if (p->NeverEvacuate() || p == owner_of_linear_allocation_area) continue;
if (p->NeverEvacuate() || (p == owner_of_linear_allocation_area) ||
!p->CanAllocate())
continue;
// Invariant: Evacuation candidates are just created when marking is
// started. This means that sweeping has finished. Furthermore, at the end
// of a GC all evacuation candidates are cleared and their slot buffers are
......
......@@ -201,6 +201,7 @@ void Page::MarkNeverAllocateForTesting() {
DCHECK(this->owner()->identity() != NEW_SPACE);
DCHECK(!IsFlagSet(NEVER_ALLOCATE_ON_PAGE));
SetFlag(NEVER_ALLOCATE_ON_PAGE);
SetFlag(NEVER_EVACUATE);
reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this);
}
......
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