GC: guard against excessive fragmentation in incremental mode
Although excessive fragmentation is already detected at the end of a major GC, it can get out of hand already during a long incremental phase. So, check for excessive fragmentation and bail out to a major GC when it happens. Related to PR 15287
This commit is contained in:
parent
fa4a6d4c13
commit
9ff64fc6ed
|
@ -5349,7 +5349,13 @@ static void garbage_collect(NewGC *gc, int force_full, int no_full,
|
|||
&& !gc->started_incremental)
|
||||
/* In incremental mode, GC earlier if we've done everything
|
||||
that we can do incrementally. */
|
||||
|| gc->accounted_incremental);
|
||||
|| gc->accounted_incremental
|
||||
/* Give up on incremental mode if fragmentation is
|
||||
getting out of hand: */
|
||||
|| (gc->started_incremental
|
||||
&& (gc->memory_in_use > GEN0_MAX_SIZE)
|
||||
&& (mmu_memory_allocated_and_used(gc->mmu)
|
||||
> (HIGH_FRAGMENTATION_RATIO * gc->memory_in_use))));
|
||||
|
||||
if (gc->gc_full && no_full)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user