[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}
This commit is contained in:
parent
17318bbd39
commit
44b70cb744
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user