servo / rust-smallvec

"Small vector" optimization for Rust: store up to a small number of items on the stack
Apache License 2.0
1.32k stars 141 forks source link

Support parametric allocators #55

Open joshlf opened 7 years ago

joshlf commented 7 years ago

Add support for passing a custom allocator with the new allocator API.

Des-Nerger commented 2 months ago

Just to note: such capability doesn't necessarily have to be nightly-only. E.g. hashbrown is a good example of unifying both the nightly-rust allocator-api feature and stable-rust allocator-api2 crate under the same interface. (On the allocator implementation side of things, bumpalo does support allocator-api2, too.)