7 ms·
Try harder: https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#tymethod.alloc https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#t... You can i
by tal8d 7y ago
Try harder:
https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#tymethod.alloc https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#t...
You can implement your own global allocator, use an existing crate, or (in the case of user applications) use the system's. That is for the stdlib level, not even core...
- muricula 7y agoNope, the GP is still correct. If your custom allocator fails, anything created with Box::new or similar will panic.