| Index: src/heap/spaces.cc
|
| diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
|
| index dc271ecc66e9292eb3cec230abd8e6c69e1c0884..371dfb1e5627b403886d4d292f782debb630d5cf 100644
|
| --- a/src/heap/spaces.cc
|
| +++ b/src/heap/spaces.cc
|
| @@ -849,6 +849,17 @@ void Page::CreateBlackArea(Address start, Address end) {
|
| static_cast<int>(end - start));
|
| }
|
|
|
| +void Page::DestroyBlackArea(Address start, Address end) {
|
| + DCHECK(heap()->incremental_marking()->black_allocation());
|
| + DCHECK_EQ(Page::FromAddress(start), this);
|
| + DCHECK_NE(start, end);
|
| + DCHECK_EQ(Page::FromAddress(end - 1), this);
|
| + MarkingState::Internal(this).bitmap()->ClearRange(
|
| + AddressToMarkbitIndex(start), AddressToMarkbitIndex(end));
|
| + MarkingState::Internal(this).IncrementLiveBytes(
|
| + -static_cast<int>(end - start));
|
| +}
|
| +
|
| void MemoryAllocator::PartialFreeMemory(MemoryChunk* chunk,
|
| Address start_free) {
|
| // We do not allow partial shrink for code.
|
| @@ -1413,6 +1424,15 @@ void PagedSpace::MarkAllocationInfoBlack() {
|
| }
|
| }
|
|
|
| +void PagedSpace::UnmarkAllocationInfo() {
|
| + Address current_top = top();
|
| + Address current_limit = limit();
|
| + if (current_top != nullptr && current_top != current_limit) {
|
| + Page::FromAllocationAreaAddress(current_top)
|
| + ->DestroyBlackArea(current_top, current_limit);
|
| + }
|
| +}
|
| +
|
| // Empty space allocation info, returning unused area to free list.
|
| void PagedSpace::EmptyAllocationInfo() {
|
| // Mark the old linear allocation area with a free space map so it can be
|
|
|