mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (garbage_collect, gc_marks): move the location of
clear and restore rb_objspace_t::mark_func_data from garbage_collect() to gc_marks(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6cbd18d7ef
commit
aab12ec054
2 changed files with 12 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Oct 24 10:33:09 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (garbage_collect, gc_marks): move the location of
|
||||
clear and restore rb_objspace_t::mark_func_data
|
||||
from garbage_collect() to gc_marks().
|
||||
|
||||
Wed Oct 24 10:17:45 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* ext/objspace/objspace.c (Init_objspace): add a new method
|
||||
|
|
13
gc.c
13
gc.c
|
@ -2914,6 +2914,10 @@ gc_marks(rb_objspace_t *objspace)
|
|||
{
|
||||
struct gc_list *list;
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
struct mark_func_data_struct *prev_mark_func_data;
|
||||
|
||||
prev_mark_func_data = objspace->mark_func_data;
|
||||
objspace->mark_func_data = 0;
|
||||
|
||||
gc_prof_mark_timer_start(objspace);
|
||||
|
||||
|
@ -2951,6 +2955,8 @@ gc_marks(rb_objspace_t *objspace)
|
|||
gc_mark_stacked_objects(objspace);
|
||||
|
||||
gc_prof_mark_timer_stop(objspace);
|
||||
|
||||
objspace->mark_func_data = prev_mark_func_data;
|
||||
}
|
||||
|
||||
/* GC */
|
||||
|
@ -3020,8 +3026,6 @@ rb_gc_unregister_address(VALUE *addr)
|
|||
static int
|
||||
garbage_collect(rb_objspace_t *objspace)
|
||||
{
|
||||
struct mark_func_data_struct *prev_mark_func_data;
|
||||
|
||||
if (GC_NOTIFY) printf("start garbage_collect()\n");
|
||||
|
||||
if (!heaps) {
|
||||
|
@ -3033,9 +3037,6 @@ garbage_collect(rb_objspace_t *objspace)
|
|||
|
||||
gc_prof_timer_start(objspace);
|
||||
|
||||
prev_mark_func_data = objspace->mark_func_data;
|
||||
objspace->mark_func_data = 0;
|
||||
|
||||
rest_sweep(objspace);
|
||||
|
||||
during_gc++;
|
||||
|
@ -3045,8 +3046,6 @@ garbage_collect(rb_objspace_t *objspace)
|
|||
gc_sweep(objspace);
|
||||
gc_prof_sweep_timer_stop(objspace);
|
||||
|
||||
objspace->mark_func_data = prev_mark_func_data;
|
||||
|
||||
gc_prof_timer_stop(objspace, Qtrue);
|
||||
if (GC_NOTIFY) printf("end garbage_collect()\n");
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue