fitzgen / bumpalo

A fast bump allocation arena for Rust
https://docs.rs/bumpalo
Apache License 2.0
1.35k stars 110 forks source link

Bump::alloc_overhead #180

Open stepancheg opened 1 year ago

stepancheg commented 1 year ago

Bumpalo provides chunk_capacity function which is helpful to understand that's alloc overhead in current chunk.

However, previous chunks may also have unused capacity.

So a function like alloc_overhead may be helpful to understand what is the overhead when allocating with bumpalo.