mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
31fea1709f
remove per-object gcnext pointer from MRB_OBJECT_HEADER, saving one word (8 bytes on 64-bit) per object slot. the gray list for tri-color marking is replaced by a fixed-size stack (MRB_GRAY_STACK_SIZE=1024) in mrb_gc. when the stack overflows, a linear heap rescan recovers gray objects. object slot size: 48 -> 40 bytes (16.7% reduction on 64-bit). benchmarks show up to 12% RSS reduction on object-heavy workloads with neutral performance impact. Co-authored-by: Claude <noreply@anthropic.com>