Two bump arenas. arena_reset_trans() runs between top-level forms; top-level define / set! deep-copy the bound value graph into perm via Cheney-style forwarding (pin = -1 + stashed fwd pointer in .car/.val) so no perm cell ever points into trans. Args slice in eval's apply path also gets explicit os.free per dispatch — without that the rt_ensure page-per-call leak dominated and masked the reset. test_huge peaks at ~2.6 MB under massif --pages-as-heap=yes, down from ~525 MB pre-arena (~200x).
54 KiB
54 KiB