ruby-changes:36333
From: ko1 <ko1@a...>
Date: Fri, 14 Nov 2014 05:31:36 +0900 (JST)
Subject: [ruby-changes:36333] ko1:r48414 (trunk): * gc.c: refactoring.
ko1 2014-11-14 05:31:29 +0900 (Fri, 14 Nov 2014) New Revision: 48414 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48414 Log: * gc.c: refactoring. * gc.c: use GC_ENABLE_INCREMENTAL_MARK instead of USE_RINCGC. * gc.c (gc_start): check FORCE_MAJOR_GC. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 48413) +++ ChangeLog (revision 48414) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Nov 14 05:29:46 2014 Koichi Sasada <ko1@a...> + + * gc.c: refactoring. + + * gc.c: use GC_ENABLE_INCREMENTAL_MARK instead of USE_RINCGC. + + * gc.c (gc_start): check FORCE_MAJOR_GC. + Fri Nov 14 04:51:18 2014 Koichi Sasada <ko1@a...> * gc.c: Tuning RincGC parameters. Index: gc.c =================================================================== --- gc.c (revision 48413) +++ gc.c (revision 48414) @@ -586,7 +586,7 @@ typedef struct rb_objspace { https://github.com/ruby/ruby/blob/trunk/gc.c#L586 size_t error_count; #endif } rgengc; -#if USE_RINCGC +#if GC_ENABLE_INCREMENTAL_MARK struct { size_t pooled_slots; size_t step_slots; @@ -5374,7 +5374,6 @@ rb_gc_writebarrier_generational(VALUE a, https://github.com/ruby/ruby/blob/trunk/gc.c#L5374 } #if GC_ENABLE_INCREMENTAL_MARK - static void gc_mark_from(rb_objspace_t *objspace, VALUE obj, VALUE parent) { @@ -5526,7 +5525,6 @@ rb_gc_unprotect_logging(void *objptr, co https://github.com/ruby/ruby/blob/trunk/gc.c#L5525 st_insert(rgengc_unprotect_logging_table, (st_data_t)ptr, cnt); } } - #endif /* USE_RGENGC */ void @@ -5852,9 +5850,12 @@ gc_start(rb_objspace_t *objspace, const https://github.com/ruby/ruby/blob/trunk/gc.c#L5850 reason |= objspace->rgengc.need_major_gc; do_full_mark = TRUE; } + else if (RGENGC_FORCE_MAJOR_GC) { + reason = GPR_FLAG_MAJOR_BY_FORCE; + do_full_mark = TRUE; + } objspace->rgengc.need_major_gc = GPR_FLAG_NONE; - if (RGENGC_FORCE_MAJOR_GC) objspace->rgengc.need_major_gc = GPR_FLAG_MAJOR_BY_NOFREE; #endif } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/