Re:Custom Allocators in Rust
by tomjakubowski on Saturday April 08, 2023 @01:31PM
(#35495605)
You might want custom local allocators. You can already replace the global allocator with one designed to reduce fragmentation, as described in the article.
You can already do custom allocation in Rust. These efforts are about bringing support for custom allocators to the types in `std` so that you can combine use of a normal `Vec` with a custom allocator, instead of needing to definte your own `Vec` (or at least pull one in from a 3rd party crate).
Can help in incidents like the below:
https://www.svix.com/blog/heap-fragmentation-in-rust-applica...