fitzgen / bumpalo

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

Investigate (optionally) allocating initial chunks in a bump arena on the stack #104

Open fitzgen opened 3 years ago

fitzgen commented 3 years ago

We could use const generics to control the size, perhaps.

This means that the initial N bytes of allocation wouldn't need to hit the global allocator.

cc @cfallin

i404788 commented 1 year ago

Is this something that is still under consideration?

It would quite cool for embedded, since you'd be able to do 'dynamic' allocations on the stack without the need for a full allocator.

fitzgen commented 1 year ago

It would be a breaking change, at least as initially formulated, so won't happen until the Allocator trait is stable in std at the very least.