File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1885,6 +1885,12 @@ void Heap::Scavenge() {
18851885 IncrementalMarking::PauseBlackAllocationScope pause_black_allocation (
18861886 incremental_marking ());
18871887
1888+ if (mark_compact_collector ()->sweeper ().sweeping_in_progress () &&
1889+ memory_allocator_->unmapper ()->NumberOfDelayedChunks () >
1890+ kMaxSemiSpaceSizeInKB / Page::kPageSize ) {
1891+ mark_compact_collector ()->EnsureSweepingCompleted ();
1892+ }
1893+
18881894 mark_compact_collector ()->sweeper ().EnsureNewSpaceCompleted ();
18891895
18901896 SetGCState (SCAVENGE);
Original file line number Diff line number Diff line change @@ -1199,6 +1199,11 @@ class V8_EXPORT_PRIVATE MemoryAllocator {
11991199
12001200 bool has_delayed_chunks () { return delayed_regular_chunks_.size () > 0 ; }
12011201
1202+ int NumberOfDelayedChunks () {
1203+ base::LockGuard<base::Mutex> guard (&mutex_);
1204+ return static_cast <int >(delayed_regular_chunks_.size ());
1205+ }
1206+
12021207 private:
12031208 static const int kReservedQueueingSlots = 64 ;
12041209 static const int kMaxUnmapperTasks = 24 ;
You can’t perform that action at this time.
0 commit comments