3 ms·
One can get all of the problems mentioned with allocators other than malloc, up to and including using only the stack. Also, sure the implementation of another
by dbaupp 10y ago
One can get all of the problems mentioned with allocators other than malloc, up to and including using only the stack.
Also, sure the implementation of another allocator might use a smattering of `unsafe`, but I'm guess that it will be less than you probably expect: one of Rust's biggest is strengths is the ability to build safe interfaces for things without performance cost. One can see an example for this in http://os.phil-opp.com/ http://os.phil-opp.com/ where the author is slowly describing creating an operating system, all while concentrating on how to exploit Rust features to let the compiler help the programmer, such as http://os.phil-opp.com/modifying-page-tables.html http://os.phil-opp.com/modifying-page-tables.html .