Conservative Garbage Collection in 300 Lines of C
Implementing a garbage collector for the Yar compiler meant scanning the stack without knowing what’s a pointer. Mark-and-sweep, conservative scanning via setjmp, heap growth targeting, and the fun part: making it work when threads are running.
