From be5ed87c2f2f8d17665fde4c939ac1605d402ac4 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 16 May 2014 08:38:04 +0000 Subject: * gc.c (gc_before_sweep): heap_pages_swept_slots should contains heap_pages_increment. For example, GC by exceeding malloc_limit can remain heap_pages_increment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index f64909006c..fd0a90d724 100644 --- a/gc.c +++ b/gc.c @@ -2910,7 +2910,8 @@ gc_before_sweep(rb_objspace_t *objspace) rb_sweep_method_entry(GET_VM()); } - heap_pages_swept_slots = 0; + /* sometimes heap_pages_increment is not 0 */ + heap_pages_swept_slots = heap_pages_increment * HEAP_OBJ_LIMIT; total_limit_slot = objspace_total_slot(objspace); heap_pages_min_free_slots = (size_t)(total_limit_slot * GC_HEAP_FREE_SLOTS_MIN_RATIO); -- cgit v1.2.3