Skip to content

Commit a599ed4

Browse files
authored
[release 1.10] trigger a full sweep if beyond max total memory (#51843)
Otherwise `--heap-size-hint` will become a no-op. Likely a merge bug from #51661.
1 parent 4e1759c commit a599ed4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/gc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,8 +3267,10 @@ static int _jl_gc_collect(jl_ptls_t ptls, jl_gc_collection_t collection)
32673267

32683268

32693269
// If the live data outgrows the suggested max_total_memory
3270-
// we keep going with minimum intervals and full gcs until
3271-
// we either free some space or get an OOM error.
3270+
// we keep going with full gcs until we either free some space or get an OOM error.
3271+
if (live_bytes > max_total_memory) {
3272+
sweep_full = 1;
3273+
}
32723274
if (gc_sweep_always_full) {
32733275
sweep_full = 1;
32743276
}

0 commit comments

Comments
 (0)