Commit 44b70cb7 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Do not clear mark bits of black large objects on right trim.

BUG=

Review-Url: https://codereview.chromium.org/2592603002
Cr-Commit-Position: refs/heads/master@{#41838}
parent 17318bbd
......@@ -3234,16 +3234,15 @@ void Heap::RightTrimFixedArray(FixedArrayBase* object, int elements_to_trim) {
// of the object changed significantly.
if (!lo_space()->Contains(object)) {
CreateFillerObjectAt(new_end, bytes_to_trim, ClearRecordedSlots::kYes);
}
// Clear the mark bits of the black area that belongs now to the filler.
// This is an optimization. The sweeper will release black fillers anyway.
if (incremental_marking()->black_allocation() &&
Marking::IsBlackOrGrey(ObjectMarking::MarkBitFrom(new_end))) {
Page* page = Page::FromAddress(new_end);
page->markbits()->ClearRange(
page->AddressToMarkbitIndex(new_end),
page->AddressToMarkbitIndex(new_end + bytes_to_trim));
// Clear the mark bits of the black area that belongs now to the filler.
// This is an optimization. The sweeper will release black fillers anyway.
if (incremental_marking()->black_allocation() &&
Marking::IsBlackOrGrey(ObjectMarking::MarkBitFrom(new_end))) {
Page* page = Page::FromAddress(new_end);
page->markbits()->ClearRange(
page->AddressToMarkbitIndex(new_end),
page->AddressToMarkbitIndex(new_end + bytes_to_trim));
}
}
// Initialize header of the trimmed array. We are storing the new length
......
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