diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 8 |
2 files changed, 8 insertions, 4 deletions
@@ -1,3 +1,7 @@ +Sat May 25 17:06:25 2013 Koichi Sasada <ko1@atdot.net> + + * gc.c (after_gc_sweep): reduce full GC timing. + Sat May 25 11:28:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> * variable.c (set_const_visibility): return without clearing method @@ -2252,13 +2252,13 @@ after_gc_sweep(rb_objspace_t *objspace) objspace->heap.free_num, objspace->heap.free_min); if (objspace->heap.free_num < objspace->heap.free_min) { - if (objspace->rgengc.remembered_shady_object_count + objspace->rgengc.oldgen_object_count > (heaps_used * HEAP_OBJ_LIMIT) / 2) { + set_heaps_increment(objspace); + heaps_increment(objspace); + + if (objspace->rgengc.remembered_shady_object_count + objspace->rgengc.oldgen_object_count > (heaps_length * HEAP_OBJ_LIMIT) / 2) { /* if [oldgen]+[remembered shady] > [all object count]/2, then do major GC */ objspace->rgengc.need_major_gc = TRUE; } - - set_heaps_increment(objspace); - heaps_increment(objspace); } inc = ATOMIC_SIZE_EXCHANGE(malloc_increase, 0); |