Skip to content

Commit

Permalink
* gc.c, internal.h (rb_gc_writebarrier_remember_promoted): add a new
Browse files Browse the repository at this point in the history
  function to remember an specified object. This api is only
  experimental (strongly depend on WB/rgengc strategy).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
ko1 committed Jul 19, 2013
1 parent 8e5374d commit 344835a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Jul 19 15:09:22 2013 Koichi Sasada <ko1@atdot.net>

* 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@atdot.net>

* array.c (ary_unprotect_logging): use (void *) for first parameter
Expand Down
7 changes: 7 additions & 0 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3894,6 +3894,13 @@ rb_gc_writebarrier_unprotect_promoted(VALUE obj)
#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 */
Expand Down
1 change: 1 addition & 0 deletions internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ void rb_w32_init_file(void);
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);
Expand Down

0 comments on commit 344835a

Please sign in to comment.