News for hackers. Stuff that matters.
Re:Allocators in Rust by dmix on Saturday November 15, 2014 @04:12PM (#8612682)
This stuff is out of the scope of my knowledge, but I do know libraries such as OpenBSD's memory allocator are slower due to security optimizations. jemalloc is not known for it's security, instead it seems to be focused on performance. Security features such as ASLR, not leaving old memory around, zeroing out memory on release, etc, are not things that improve an allocators performance.
Re:Allocators in Rust by wyager on Saturday November 15, 2014 @04:15PM (#8612689)
Good point. I wonder if Rust's allocator needs fewer security features because of heavy compile-time heap safety checking. For example, I don't believe use-after-free or double-free is possible in Rust due to Rust's lifetime system (barring use of unsafe code blocks).
Re:Allocators in Rust by musername on Sunday November 16, 2014 @05:19AM (#8613870)
I second that question, as it was my first thought about the difference to the malloc in glibc, or whether it's just ignoring the supposed benefits.
Re:Allocators in Rust by db48x on Saturday November 15, 2014 @05:23PM (#8612825)
I'm not sure the point about ASLR is entirely correct; ASLR does randomize the addresses returned by mmap (slightly), and jemalloc primarily uses mmap to allocate its arenas.