From e7d8c473c17540dbc0b360efd689fbd2def69967 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 3 Jun 2014 04:19:21 +0000 Subject: * gc.c (objspace_live_slot): live slot count should not include final slot (contains T_ZOMBIE) count. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 3b0becadf8..30938e1563 100644 --- a/gc.c +++ b/gc.c @@ -2743,7 +2743,7 @@ lazy_sweep_enable(void) static size_t objspace_live_slot(rb_objspace_t *objspace) { - return objspace->profile.total_allocated_object_num - objspace->profile.total_freed_object_num; + return objspace->profile.total_allocated_object_num - objspace->profile.total_freed_object_num - heap_pages_final_slots; } static size_t -- cgit v1.2.3