File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 2727
2828 # Reset this number to 0 on major V8 upgrades.
2929 # Increment by one for each non-official patch applied to deps/v8.
30- 'v8_embedder_string' : '-node.4 ' ,
30+ 'v8_embedder_string' : '-node.5 ' ,
3131
3232 # Enable disassembler for `--print-code` v8 options
3333 'v8_enable_disassembler' : 1 ,
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