mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
f0b3fdfb14
Replace the threshold-based GC trigger (gc->threshold vs gc->live) with a debt model (gc->gc_debt). Each allocation increments debt; each GC step decrements by GC_STEP_SIZE. When a cycle completes, credit is proportional to live_after_mark * interval_ratio, giving a natural feedback loop that adapts to allocation rate. Co-authored-by: Claude <noreply@anthropic.com>