Skip to content

sidharthponram916/rust-memory-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Rust Garbage Collection

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.

Method Descriptions

reference_counting

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.

reachable

Finds all heap nodes that can be reached from any object currently referenced in the stack.

mark_and_sweep

Implements the mark-and-sweep garbage collection algorithm.

stop_and_copy

Implements the stop-and-copy garbage collection algorithm.

About

demonstrating rust memory management by implementing multiple garbage collection algorithms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages