mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
gc.c (clear_all_old): fix a generational GC bug
This issue was caused by 375d22b that introduced a serious mark
leakage in the generational GC mode.
This commit is contained in:
@@ -1240,14 +1240,12 @@ clear_all_old(mrb_state *mrb, mrb_gc *gc)
|
||||
/* finish the half baked GC */
|
||||
incremental_gc_finish(mrb, gc);
|
||||
}
|
||||
else {
|
||||
/* Sweep the dead objects, then reset all the live objects
|
||||
* (including all the old objects, of course) to white. */
|
||||
gc->generational = FALSE;
|
||||
prepare_incremental_sweep(mrb, gc);
|
||||
incremental_gc_finish(mrb, gc);
|
||||
gc->generational = TRUE;
|
||||
}
|
||||
/* Sweep the dead objects, then reset all the live objects
|
||||
* (including all the old objects, of course) to white. */
|
||||
gc->generational = FALSE;
|
||||
prepare_incremental_sweep(mrb, gc);
|
||||
incremental_gc_finish(mrb, gc);
|
||||
gc->generational = TRUE;
|
||||
/* The gray objects have already been painted as white */
|
||||
gc->atomic_gray_list = gc->gray_list = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user