add comment for clear_all_old()

This commit is contained in:
fleuria
2013-08-01 17:30:57 +08:00
parent d16edc11ca
commit c1469a57a2
+5 -1
View File
@@ -941,11 +941,15 @@ clear_all_old(mrb_state *mrb)
incremental_gc_until(mrb, GC_STATE_NONE);
}
/* Sweep the dead objects, then reset all the live objects
* (including all the old objects, of course) to white. */
mrb->is_generational_gc_mode = FALSE;
prepare_incremental_sweep(mrb);
incremental_gc_until(mrb, GC_STATE_NONE);
mrb->atomic_gray_list = mrb->gray_list = NULL;
mrb->is_generational_gc_mode = origin_mode;
/* The gray objects has already been painted as white */
mrb->atomic_gray_list = mrb->gray_list = NULL;
}
void