From 85479b34f76d5b426c2a8224d8ed6d8c2ad81ca2 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 6 May 2022 13:43:18 -0400 Subject: [PATCH] Don't allocate new page on finish sweeping We don't need to allocate a new page in gc_sweep_finish_size_pool. It can be allocated when needed. --- gc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gc.c b/gc.c index 3f4903d836..cc012f9e91 100644 --- a/gc.c +++ b/gc.c @@ -5659,8 +5659,6 @@ gc_sweep_finish_size_pool(rb_objspace_t *objspace, rb_size_pool_t *size_pool) if (extend_page_count > size_pool->allocatable_pages) { size_pool_allocatable_pages_set(objspace, size_pool, extend_page_count); } - - heap_increment(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool)); } } }