In Zig, you can provide a different allocator for a single data structure (or even distinct instances of the same data structure). There is no "global" allocator (what Rust lets you swap out.)
This is vastly more powerful, I have used this to tailor an allocator to specific data structures for better performance.
This is vastly more powerful, I have used this to tailor an allocator to specific data structures for better performance.