Commit a80e9b5b authored by Narihiro Nakamura's avatar Narihiro Nakamura

Doesn't clear black of all marked objects in major collections.

Since the minor collector doesn't need to mark these objects, the worst-case pause time is reduced.
parent 9614f134
...@@ -780,7 +780,7 @@ incremental_sweep_phase(mrb_state *mrb, size_t limit) ...@@ -780,7 +780,7 @@ incremental_sweep_phase(mrb_state *mrb, size_t limit)
} }
} }
else { else {
if (!is_minor_gc(mrb)) if (!is_generational(mrb))
paint_partial_white(mrb, &p->as.basic); /* next gc target */ paint_partial_white(mrb, &p->as.basic); /* next gc target */
dead_slot = 0; dead_slot = 0;
} }
...@@ -863,11 +863,10 @@ clear_all_old(mrb_state *mrb) ...@@ -863,11 +863,10 @@ clear_all_old(mrb_state *mrb)
if (is_major_gc(mrb)) { if (is_major_gc(mrb)) {
advance_phase(mrb, GC_STATE_NONE); advance_phase(mrb, GC_STATE_NONE);
} }
else {
mrb->is_generational_gc_mode = FALSE; mrb->is_generational_gc_mode = FALSE;
prepare_incremental_sweep(mrb); prepare_incremental_sweep(mrb);
advance_phase(mrb, GC_STATE_NONE); advance_phase(mrb, GC_STATE_NONE);
}
mrb->variable_gray_list = mrb->gray_list = NULL; mrb->variable_gray_list = mrb->gray_list = NULL;
mrb->is_generational_gc_mode = origin_mode; mrb->is_generational_gc_mode = origin_mode;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment