9 ms·
> Do you use any public available crate for those allocators? Not really, our bump allocator is ~50 LOC, it just allocates a `Box<[u8]>` with a fixed size on
by fluffything 7y ago
> Do you use any public available crate for those allocators?
Not really, our bump allocator is ~50 LOC, it just allocates a `Box<[u8]>` with a fixed size on initialization, and stores the index of the currently used memory, and that's it.
We then have a `BumpVec<T>` type that uses this allocator (`ptr`, `len`, `cap`). This type has a fixed-capacity, it cannot be moved or cloned, etc. so it ends up being much simpler than `Vec`.