[heap] Ensure that non-regular chunks are freed before scavenge
This prevents accumulation of non-regular chunks if unmapper tasks are not making progress. Bug: chromium:934453 Change-Id: I552bc4f566f4be8877d9e806cca2aa9c284a7f4f Reviewed-on: https://chromium-review.googlesource.com/c/1483055 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#59842}
This commit is contained in:
parent
45ed388d3b
commit
7fbce1ad4b
@ -639,6 +639,7 @@ void Heap::GarbageCollectionPrologue() {
|
||||
ephemeron_retainer_.clear();
|
||||
retaining_root_.clear();
|
||||
}
|
||||
memory_allocator()->unmapper()->PrepareForGC();
|
||||
}
|
||||
|
||||
size_t Heap::SizeOfObjects() {
|
||||
|
@ -796,8 +796,6 @@ void MarkCompactCollector::Prepare() {
|
||||
heap()->incremental_marking()->Stop();
|
||||
}
|
||||
|
||||
heap()->memory_allocator()->unmapper()->PrepareForMarkCompact();
|
||||
|
||||
if (!was_marked_incrementally_) {
|
||||
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_EMBEDDER_PROLOGUE);
|
||||
heap_->local_embedder_heap_tracer()->TracePrologue();
|
||||
|
@ -307,8 +307,7 @@ void MemoryAllocator::Unmapper::CancelAndWaitForPendingTasks() {
|
||||
}
|
||||
}
|
||||
|
||||
void MemoryAllocator::Unmapper::PrepareForMarkCompact() {
|
||||
CancelAndWaitForPendingTasks();
|
||||
void MemoryAllocator::Unmapper::PrepareForGC() {
|
||||
// Free non-regular chunks because they cannot be re-used.
|
||||
PerformFreeMemoryOnQueuedNonRegularChunks();
|
||||
}
|
||||
|
@ -1250,7 +1250,7 @@ class V8_EXPORT_PRIVATE MemoryAllocator {
|
||||
|
||||
V8_EXPORT_PRIVATE void FreeQueuedChunks();
|
||||
void CancelAndWaitForPendingTasks();
|
||||
void PrepareForMarkCompact();
|
||||
void PrepareForGC();
|
||||
void EnsureUnmappingCompleted();
|
||||
V8_EXPORT_PRIVATE void TearDown();
|
||||
size_t NumberOfCommittedChunks();
|
||||
|
Loading…
Reference in New Issue
Block a user