Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rust uses malloc provided by the system. It's mentioned in the article:

"I actually do have a malloc function because my Rust standard library needs to link against it"

He hasn't implemented malloc in his kernel yet (except for a stub).



She actually (Julia Evans)!

I just want to point that out since women don't get enough cred in our field.


Thanks, I'm not sure how I got that wrong. I certainly registered that it was a woman when I read the article.


> 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/


There was a really terrifying bug and he malloc got removed, wish I could remember the ticket number. Pretty sure it's not back...


The 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).


there's no relationship between "Jason Evans" and "Julia Evans" =) That's a coincidence.


> 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?)


You appear to be falling victim to the vagaries of footnote notation. Blame HN for not giving us Markdown with which to embed links!


As the sibling implied, the "[1]" link is a footnote, referred to from the paragraph mentioning jemalloc. The gender issue was a separate point.




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

Search: