diff options
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -2055,16 +2055,17 @@ gc_lazy_sweep(rb_objspace_t *objspace) GC_PROF_TIMER_START; GC_PROF_SWEEP_TIMER_START; - res = lazy_sweep(objspace); - if (res) { - GC_PROF_SWEEP_TIMER_STOP; - GC_PROF_SET_MALLOC_INFO; - GC_PROF_TIMER_STOP(Qfalse); - return res; + if (objspace->heap.sweep_slots) { + res = lazy_sweep(objspace); + if (res) { + GC_PROF_SWEEP_TIMER_STOP; + GC_PROF_SET_MALLOC_INFO; + GC_PROF_TIMER_STOP(Qfalse); + return res; + } + after_gc_sweep(objspace); } - after_gc_sweep(objspace); - gc_marks(objspace); before_gc_sweep(objspace); |