summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-04 11:21:44 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-04 11:21:44 +0000
commit3ff23bf9268d98597b14eb3198bc31dc40810841 (patch)
tree1bf1c5f337a6833ecdeaeaa6f7473973f0caefad /gc.c
parent08db452620d5e39cf239b5fc82b7fed0a33cce37 (diff)
* gc.c (after_gc_sweep, before_gc_sweep):
invoke rb_sweep_method_entry() as soon as possilbe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c10
1 files changed, 5 insertions, 5 deletions
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