This project showcases different garbage collection methods built in Rust, including reference counting, mark-and-sweep, and stop-and-copy. It simulates how memory is allocated, referenced, and freed, providing a clear look at how these techniques manage stack and heap memory efficiently.
Simulates reference counting — a garbage collection strategy where each object keeps track of how many references point to it. When the count drops to 0, the object is freed.
Finds all heap nodes that can be reached from any object currently referenced in the stack.
Implements the mark-and-sweep garbage collection algorithm.
Implements the stop-and-copy garbage collection algorithm.