3 ms·
The original design had no allocator on collections and no alloc crate. If you cares about allocation, you'd use your own data structures with your own allocat
by jenadine 4y ago
The original design had no allocator on collections and no alloc crate.
If you cares about allocation, you'd use your own data structures with your own allocator in a no_std binary.
The alloc crate came later, and the custom allocator too and is not even stable yet.
- estebank 4y agoFor people that might be confused, setting a custom global allocator is possible in stable, but the Allocator trait isn't yet, so specifying the allocator for a specific instance of a Vec isn't possible in stable. https://doc.rust-lang.org/std/alloc/index.html#the-global_allocator-attribute https://doc.rust-lang.org/std/alloc/index.html#the-global_al... https://github.com/rust-lang/wg-allocators https://github.com/rust-lang/wg-allocators