Incrementally mark even if we have free pages

We move all pooled pages to free pages at the start of incremental
marking, so we shouldn't run incremental marking only when we have run
out of free pages. This causes incremental marking to always complete
in a single step.
This commit is contained in:
Peter Zhu 2023-08-16 08:55:01 -04:00
parent 58e0a3699f
commit bead539650
Notes: git 2023-09-01 15:59:11 +00:00

2
gc.c
View File

@ -2392,7 +2392,7 @@ gc_continue(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
gc_enter(objspace, gc_enter_event_continue, &lock_lev);
/* Continue marking if in incremental marking. */
if (heap->free_pages == NULL && is_incremental_marking(objspace)) {
if (is_incremental_marking(objspace)) {
if (gc_marks_continue(objspace, size_pool, heap)) {
gc_sweep(objspace);
}