mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (garbage_collect): mark objects refered from aborting threads.
[ruby-dev:28190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e052495637
commit
cd5cd3c672
2 changed files with 16 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Dec 30 18:14:54 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* gc.c (garbage_collect): mark objects refered from aborting threads.
|
||||
[ruby-dev:28190]
|
||||
|
||||
Fri Dec 30 15:17:35 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* lib/generator.rb: (Generator#initialize) ensured to stop @loop_thread.
|
||||
|
|
20
gc.c
20
gc.c
|
@ -1017,8 +1017,6 @@ gc_sweep(void)
|
|||
st_foreach(source_filenames, sweep_source_filename, 0);
|
||||
}
|
||||
|
||||
rb_gc_abort_threads();
|
||||
|
||||
freelist = 0;
|
||||
final_list = deferred_final_list;
|
||||
deferred_final_list = 0;
|
||||
|
@ -1344,14 +1342,18 @@ garbage_collect(void)
|
|||
rb_gc_mark_parser();
|
||||
|
||||
/* gc_mark objects whose marking are not completed*/
|
||||
while (!MARK_STACK_EMPTY){
|
||||
if (mark_stack_overflow){
|
||||
gc_mark_all();
|
||||
do {
|
||||
while (!MARK_STACK_EMPTY) {
|
||||
if (mark_stack_overflow){
|
||||
gc_mark_all();
|
||||
}
|
||||
else {
|
||||
gc_mark_rest();
|
||||
}
|
||||
}
|
||||
else {
|
||||
gc_mark_rest();
|
||||
}
|
||||
}
|
||||
rb_gc_abort_threads();
|
||||
} while (!MARK_STACK_EMPTY);
|
||||
|
||||
gc_sweep();
|
||||
|
||||
return Qtrue;
|
||||
|
|
Loading…
Reference in a new issue