End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
GC::Profiler.clear
GC::Profiler.clear → nil
gc.c
View on GitHub ↗
static VALUE
gc_profile_clear(VALUE _)
{
rb_objspace_t *objspace = &rb_objspace;
void *p = objspace->profile.records;
objspace->profile.records = NULL;
objspace->profile.size = 0;
objspace->profile.next_index = 0;
objspace->profile.current_record = 0;
if (p) {
free(p);
}
return Qnil;
}
Clears the GC profiler data.