1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c, internal.h: export rb_gc_verify_internal_consistency().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2015-03-19 07:19:52 +00:00
parent 9546ba4605
commit 1643234fe3
3 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,7 @@
Thu Mar 19 16:18:00 2015 Koichi Sasada <ko1@atdot.net>
* gc.c, internal.h: export rb_gc_verify_internal_consistency().
Thu Mar 19 16:15:24 2015 Koichi Sasada <ko1@atdot.net>
* gc.c (obj_info): show allocation site if GC_DEBUG is not 0.

12
gc.c
View file

@ -4413,9 +4413,7 @@ gc_mark_stacked_objects(rb_objspace_t *objspace, int incremental, size_t count)
#endif
}
if (RGENGC_CHECK_MODE >= 3) {
gc_verify_internal_consistency(Qnil);
}
if (RGENGC_CHECK_MODE >= 3) gc_verify_internal_consistency(Qnil);
if (is_mark_stack_empty(mstack)) {
shrink_stack_chunk_cache(mstack);
@ -4952,7 +4950,7 @@ gc_verify_heap_pages(rb_objspace_t *objspace)
* if RGenGC is supported.
*/
static VALUE
gc_verify_internal_consistency(VALUE self)
gc_verify_internal_consistency(VALUE dummy)
{
rb_objspace_t *objspace = &rb_objspace;
struct verify_internal_consistency_struct data = {0};
@ -5029,6 +5027,12 @@ gc_verify_internal_consistency(VALUE self)
return Qnil;
}
void
rb_gc_verify_internal_consistency(void)
{
gc_verify_internal_consistency(Qnil);
}
/* marks */
static void

View file

@ -1291,6 +1291,8 @@ st_table *rb_st_copy(VALUE obj, struct st_table *orig_tbl);
/* gc.c (export) */
size_t rb_obj_memsize_of(VALUE);
void rb_gc_verify_internal_consistency(void);
#define RB_OBJ_GC_FLAGS_MAX 5
size_t rb_obj_gc_flags(VALUE, ID[], size_t);
void rb_gc_mark_values(long n, const VALUE *values);