Ben Chuanlong Du's Blog

It is never too late to learn.

Garbage Collection for Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

crossbeam-epoch

The

crossbeam-epoch crate provides epoch-based garbage collection for building concurrent data structures.

bumpalo

bumpalo is a fast bump allocation arena for Rust. Bump allocation is a fast, but limited approach to allocation. We have a chunk of memory, and we maintain a pointer within that memory. Whenever we allocate an object, we do a quick check that we have enough capacity left in our chunk to allocate the object and then update the pointer by the object's size. That's it!

sharded-slab

sharded-slab is a lock-free concurrent slab. Slabs provide pre-allocated storage for many instances of a single data type. When a large number of values of a single type are required, this can be more efficient than allocating each item individually. Since the allocated items are the same size, memory fragmentation is reduced, and creating and removing new items can be very cheap.

slab

slab provides pre-allocated storage for a uniform data type.

rust-gc

rust-gc is a simple tracing (mark and sweep) garbage collector for Rust .

References

Comments