ring-alloc

crates docs actions MIT/Apache loc

Ring-based allocator for Rust. This allocator is more flexible compared to arena-based allocators since there's no lifetime bounds.

However user should deallocate memory in short time to avoid wasting memory.

Allocator uses ring buffer of chunks to allocate memory in front chunk, moving it to back if chunk is full. If next chunk is still occupied by previous allocation, allocator will allocate new chunk.

If all allocations are deallocated while ring makes one full turn, no new chunks will be allocated.

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.