ruby-changes:30010
From: ko1 <ko1@a...>
Date: Fri, 19 Jul 2013 15:11:24 +0900 (JST)
Subject: [ruby-changes:30010] ko1:r42062 (trunk): * gc.c, internal.h (rb_gc_writebarrier_remember_promoted): add a new
ko1 2013-07-19 15:11:09 +0900 (Fri, 19 Jul 2013) New Revision: 42062 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42062 Log: * gc.c, internal.h (rb_gc_writebarrier_remember_promoted): add a new function to remember an specified object. This api is only experimental (strongly depend on WB/rgengc strategy). Modified files: trunk/ChangeLog trunk/gc.c trunk/internal.h Index: ChangeLog =================================================================== --- ChangeLog (revision 42061) +++ ChangeLog (revision 42062) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jul 19 15:09:22 2013 Koichi Sasada <ko1@a...> + + * gc.c, internal.h (rb_gc_writebarrier_remember_promoted): add a new + function to remember an specified object. This api is only + experimental (strongly depend on WB/rgengc strategy). + Fri Jul 19 14:56:00 2013 Koichi Sasada <ko1@a...> * array.c (ary_unprotect_logging): use (void *) for first parameter Index: gc.c =================================================================== --- gc.c (revision 42061) +++ gc.c (revision 42062) @@ -3894,6 +3894,13 @@ rb_gc_writebarrier_unprotect_promoted(VA https://github.com/ruby/ruby/blob/trunk/gc.c#L3894 #endif } +void +rb_gc_writebarrier_remember_promoted(VALUE obj) +{ + rb_objspace_t *objspace = &rb_objspace; + rgengc_remember(objspace, obj); +} + #endif /* USE_RGENGC */ /* RGENGC analysis information */ Index: internal.h =================================================================== --- internal.h (revision 42061) +++ internal.h (revision 42062) @@ -278,6 +278,7 @@ void rb_w32_init_file(void); https://github.com/ruby/ruby/blob/trunk/internal.h#L278 void Init_heap(void); void *ruby_mimmalloc(size_t size); void rb_objspace_set_event_hook(const rb_event_flag_t event); +void rb_gc_writebarrier_remember_promoted(VALUE obj); /* hash.c */ struct st_table *rb_hash_tbl_raw(VALUE hash); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/