ysbaddaden/gc

Fixed roots

Opened this issue · 1 comments

Currently, the algorithms loads the roots at every collection, but that's unnecessary for all the fixed segments of the binary. It would be better to have them always loaded and avoid the (little) extra time and memory it takes to load each segment.

We'd still have to copy them, because we push all crystal fibers as roots (and we're about to push all threads too), and the collector pops everything (AFAIR), and on ELF-based systems (Darwin) it's merely accessing global pointers, so it's cheap, so 🤷

Anyway, you did just that in #24 with Segments :)