4 ms·
> Rust uses malloc provided by the system. It doesn't lock you into the system allocator. You can LD_PRELOAD your own, and in the past Rust has even shipped wi
by kibwen 13y ago
> Rust uses malloc provided by the system.
It doesn't lock you into the system allocator. You can LD_PRELOAD your own, and in the past Rust has even shipped with and used jemalloc[1] (though I believe it's not using it at the moment). Furthermore, as alluded to at the end of the article, you can override the compiler's malloc implementation via what Rust calls "lang items" (which are sadly ill-documented).
> He hasn't implemented malloc in his kernel yet (except for a stub).
Rather, Julia hasn't implemented malloc in her kernel yet.
[1] http://www.canonware.com/jemalloc/ http://www.canonware.com/jemalloc/
- pekk 13y ago> Copyright © 2013 Jason Evans I think you could forgive people for not knowing that Jason and Julia are the same person? (that's what you are implying, right?)
- kibwen 13y agoYou appear to be falling victim to the vagaries of footnote notation. Blame HN for not giving us Markdown with which to embed links!
- Sharlin 13y agoAs the sibling implied, the "[1]" link is a footnote, referred to from the paragraph mentioning jemalloc. The gender issue was a separate point.
- jvns 13y agothere's no relationship between "Jason Evans" and "Julia Evans" =) That's a coincidence.
- steveklabnik 13y agoThere was a really terrifying bug and he malloc got removed, wish I could remember the ticket number. Pretty sure it's not back...
- kibwen 13y agoThe first time that jemalloc got removed was because our red zones were simply too small for it to work. The second time that it got removed was because somehow Rust was using jemalloc to allocate some memory and, once in a while, an entirely different allocator to free that memory (this is likely the terrifying bug that you remember).