Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 850 Bytes

README.md

File metadata and controls

23 lines (14 loc) · 850 Bytes

Baby's First Garbage Collector

This is an implementation of a simple mark & sweep garbage collector as described at Bob Nystrom's blog post Baby's First Garbage Collector.

Description

Bob's code was easy to follow, but I was interested in seeing it work for myself. I though it would be useful to create a barebones projects for others interested in toying with a simple garbage collector.

I also took the liberty of peppering some printfs around to report the status of various things.

It's also been many years since I wrote any C and this was a nice reminder of how to do it.

Compiling

Requires make and gcc. Compile with make and run make clean to destroy the evidence.

Running

After compiling simply execute the babyvm binary and enjoy!