A bucket allocation implementation in pure rust
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
readme.md | ||
rust-toolchain.toml |
bucket-alloc
A bucket allocator implemented in pure rust.
License
This project is licensed under AGPL3.0-only; for more details see the LICENSE
file.
Usage
In order to work, the allocator needs another one to supply underlaying memory for the allocator to create buckets to place pebbles (allocations) into.
static SYS_ALLOC: std::alloc::System = std::alloc::System;
static BUCK_ALLOC: std::sync::LazyLock<BucketAlloc<std::alloc::System>> =
std::sync::LazyLock::new(|| BucketAlloc::new(SYS_ALLOC));
Thanks
- fysnet for the documentation of how a bucket allocator works: https://github.com/fysnet/FYSOS/blob/master/bucket/Section20.pdf