mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
08db452620
commit
3ff23bf926
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Nov 4 19:20:46 2010 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* 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 <ko1@atdot.net>
|
Thu Nov 4 19:13:58 2010 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (after_gc_sweep, slot_sweep): finalizers should be invoked
|
* gc.c (after_gc_sweep, slot_sweep): finalizers should be invoked
|
||||||
|
|
10
gc.c
10
gc.c
|
@ -1979,6 +1979,11 @@ before_gc_sweep(rb_objspace_t *objspace)
|
||||||
}
|
}
|
||||||
objspace->heap.sweep_slots = heaps;
|
objspace->heap.sweep_slots = heaps;
|
||||||
objspace->heap.free_num = 0;
|
objspace->heap.free_num = 0;
|
||||||
|
|
||||||
|
/* sweep unlinked method entries */
|
||||||
|
if (th->vm->unlinked_method_entry_list) {
|
||||||
|
rb_sweep_method_entry(th->vm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1999,11 +2004,6 @@ after_gc_sweep(rb_objspace_t *objspace)
|
||||||
malloc_increase = 0;
|
malloc_increase = 0;
|
||||||
|
|
||||||
free_unused_heaps(objspace);
|
free_unused_heaps(objspace);
|
||||||
|
|
||||||
/* sweep unlinked method entries */
|
|
||||||
if (th->vm->unlinked_method_entry_list) {
|
|
||||||
rb_sweep_method_entry(th->vm);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue