Commit a5b5a3c1 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Fix allocation observer for young large objects

The allocation observer step should be called only after the page flags
of the young large object are properly set up.

Bug: chromium:852420
Change-Id: I9f537a7c1d6b7aa15ccbe58006e3957a2ec2ab5c
Reviewed-on: https://chromium-review.googlesource.com/c/1477735Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59696}
parent 981c1ac9
......@@ -3463,6 +3463,7 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
heap()->incremental_marking()->marking_state()->IsBlack(object));
page->InitializationMemoryFence();
heap()->NotifyOldGenerationExpansion();
AllocationStep(object_size, object->address(), object_size);
return object;
}
......@@ -3479,7 +3480,6 @@ LargePage* LargeObjectSpace::AllocateLargePage(int object_size,
heap()->CreateFillerObjectAt(object->address(), object_size,
ClearRecordedSlots::kNo);
AllocationStep(object_size, object->address(), object_size);
return page;
}
......@@ -3779,6 +3779,7 @@ AllocationResult NewLargeObjectSpace::AllocateRaw(int object_size) {
page->InitializationMemoryFence();
DCHECK(page->IsLargePage());
DCHECK_EQ(page->owner()->identity(), NEW_LO_SPACE);
AllocationStep(object_size, result->address(), object_size);
return result;
}
......
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