gc.c: do nothing unless USE_RGENGC
* gc.c (gc_verify_internal_consistency): always do nothing unless USE_RGENGC is set, no local variable needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1a00d07619
commit
04de1d7dfe
4
gc.c
4
gc.c
@ -4252,21 +4252,21 @@ verify_internal_consistency_i(void *page_start, void *page_end, size_t stride, v
|
|||||||
static VALUE
|
static VALUE
|
||||||
gc_verify_internal_consistency(VALUE self)
|
gc_verify_internal_consistency(VALUE self)
|
||||||
{
|
{
|
||||||
|
#if USE_RGENGC
|
||||||
struct verify_internal_consistency_struct data;
|
struct verify_internal_consistency_struct data;
|
||||||
data.objspace = &rb_objspace;
|
data.objspace = &rb_objspace;
|
||||||
data.err_count = 0;
|
data.err_count = 0;
|
||||||
|
|
||||||
#if USE_RGENGC
|
|
||||||
{
|
{
|
||||||
struct each_obj_args eo_args;
|
struct each_obj_args eo_args;
|
||||||
eo_args.callback = verify_internal_consistency_i;
|
eo_args.callback = verify_internal_consistency_i;
|
||||||
eo_args.data = (void *)&data;
|
eo_args.data = (void *)&data;
|
||||||
objspace_each_objects((VALUE)&eo_args);
|
objspace_each_objects((VALUE)&eo_args);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (data.err_count != 0) {
|
if (data.err_count != 0) {
|
||||||
rb_bug("gc_verify_internal_consistency: found internal consistency.\n");
|
rb_bug("gc_verify_internal_consistency: found internal consistency.\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user