fitzgen / bumpalo

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

Find capacity of bump #130

Closed jkelleyrtp closed 2 years ago

jkelleyrtp commented 2 years ago

Is there a way to grab the amount of memory a bump is using? I want to allocate a new bump with the same size of a previous bump but there doesn't seem to be a way to grab that size out.

Edit: did not realize allocated_bytes was the right method. Was looking for "size" or "len" or "capacity"