Arc Forumnew | comments | leaders | submitlogin
Cairntaker, a garbage collector in JS (
3 points by rocketnia 2376 days ago | 1 comment

2 points by rocketnia 2376 days ago | link


A while back[1], waterhouse was thinking about garbage collection, and I was inspired to try it out myself.




Working closely off of two papers[2][3], I've implemented an incremental garbage collector in JavaScript, paying close attention to a particular reachability interaction between weak tables and immutable structures. I'm not sure anyone has addressed this interaction before.

I don't really have much use for Cairntaker yet, but it jives with my personal intuitions about reachability, and I expect it to come in handy for my own future language implementations.

[2] "Ephemerons: A New Finalization Mechanism," Hayes '97.

[3] "Real-Time Non-Copying Garbage Collection," Wilson and Johnstone '93.