No need to protect red objects

The object in `GC_RED` does not need to be marked, and the objects connected to this object should also not need to be marked.
This commit is contained in:
dearblue
2022-03-13 16:28:43 +09:00
parent a2e9005286
commit c3eac4fe5c
+1
View File
@@ -448,6 +448,7 @@ mrb_gc_destroy(mrb_state *mrb, mrb_gc *gc)
static void
gc_protect(mrb_state *mrb, mrb_gc *gc, struct RBasic *p)
{
if (is_red(p)) return;
#ifdef MRB_GC_FIXED_ARENA
if (gc->arena_idx >= MRB_GC_ARENA_SIZE) {
/* arena overflow error */