Commit 75877ddb authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Do not unmap large pages before evacuation.

See https://bugs.chromium.org/p/chromium/issues/detail?id=762677#c12 for
the description of the bug.

Bug: chromium:762677
TBR: mlippautz@chromium.org
Change-Id: If5c4c2c15f2403d336edf34d10679521397db75c
Reviewed-on: https://chromium-review.googlesource.com/670823
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48061}
parent 596d55ad
......@@ -2565,6 +2565,8 @@ void MinorMarkCompactCollector::EvacuatePrologue() {
void MinorMarkCompactCollector::EvacuateEpilogue() {
heap()->new_space()->set_age_mark(heap()->new_space()->top());
// Give pages that are queued to be freed back to the OS.
heap()->memory_allocator()->unmapper()->FreeQueuedChunks();
}
void MinorMarkCompactCollector::Evacuate() {
......@@ -2590,9 +2592,6 @@ void MinorMarkCompactCollector::Evacuate() {
}
}
// Give pages that are queued to be freed back to the OS.
heap()->memory_allocator()->unmapper()->FreeQueuedChunks();
{
TRACE_GC(heap()->tracer(), GCTracer::Scope::MINOR_MC_EVACUATE_CLEAN_UP);
for (Page* p : new_space_evacuation_pages_) {
......@@ -3193,8 +3192,12 @@ void MarkCompactCollector::EvacuatePrologue() {
void MarkCompactCollector::EvacuateEpilogue() {
// New space.
heap()->new_space()->set_age_mark(heap()->new_space()->top());
// Deallocate unmarked large objects.
heap()->lo_space()->FreeUnmarkedObjects();
// Old space. Deallocate evacuated candidate pages.
ReleaseEvacuationCandidates();
// Give pages that are queued to be freed back to the OS.
heap()->memory_allocator()->unmapper()->FreeQueuedChunks();
#ifdef DEBUG
// Old-to-old slot sets must be empty after evacuation.
for (Page* p : *heap()->old_space()) {
......@@ -4416,7 +4419,6 @@ void MarkCompactCollector::ReleaseEvacuationCandidates() {
}
old_space_evacuation_pages_.clear();
compacting_ = false;
heap()->memory_allocator()->unmapper()->FreeQueuedChunks();
}
int MarkCompactCollector::Sweeper::ParallelSweepSpace(AllocationSpace identity,
......@@ -4585,9 +4587,6 @@ void MarkCompactCollector::StartSweepSpaces() {
}
sweeper().StartSweeping();
}
// Deallocate unmarked large objects.
heap_->lo_space()->FreeUnmarkedObjects();
}
} // namespace internal
......
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