Hacker News new | past | comments | ask | show | jobs | submit login

Try harder: 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...




Nope, the GP is still correct. If your custom allocator fails, anything created with Box::new or similar will panic.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: