summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gc/default/default.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc/default/default.c b/gc/default/default.c
index ef100d7dea..6c2b13c9f3 100644
--- a/gc/default/default.c
+++ b/gc/default/default.c
@@ -3813,7 +3813,7 @@ gc_sweep_finish_heap(rb_objspace_t *objspace, rb_heap_t *heap)
heap_allocatable_slots_expand(objspace, heap, swept_slots, heap->total_slots);
}
}
- else {
+ else if (objspace->heap_pages.allocatable_slots < (min_free_slots - swept_slots)) {
gc_needs_major_flags |= GPR_FLAG_MAJOR_BY_NOFREE;
heap->force_major_gc_count++;
}