diff --git a/ChangeLog b/ChangeLog index 41b7e1a9fc..eadff14ab6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 4 19:20:46 2010 Koichi Sasada + + * gc.c (after_gc_sweep, before_gc_sweep): + invoke rb_sweep_method_entry() as soon as possilbe. + Thu Nov 4 19:13:58 2010 Koichi Sasada * gc.c (after_gc_sweep, slot_sweep): finalizers should be invoked diff --git a/gc.c b/gc.c index 8912e1cb57..92a2382e55 100644 --- a/gc.c +++ b/gc.c @@ -1979,6 +1979,11 @@ before_gc_sweep(rb_objspace_t *objspace) } objspace->heap.sweep_slots = heaps; objspace->heap.free_num = 0; + + /* sweep unlinked method entries */ + if (th->vm->unlinked_method_entry_list) { + rb_sweep_method_entry(th->vm); + } } static void @@ -1999,11 +2004,6 @@ after_gc_sweep(rb_objspace_t *objspace) malloc_increase = 0; free_unused_heaps(objspace); - - /* sweep unlinked method entries */ - if (th->vm->unlinked_method_entry_list) { - rb_sweep_method_entry(th->vm); - } } static int