Guides for reducing binary sizes with Rust recommend disabling jemalloc to create an apples-to-apples comparison with C. Do you have any predictions or goals for the resulting binary sizes created using elfmalloc?
We haven't thought about that yet, so I don't have a good answer. I ran cargo build --release in the elfmalloc crate, and the resulting libelfmalloc.rlib is 836K. I'm not sure how that compares to jemalloc, though.
FYI the size of an .rlib is pretty far removed from binary size because it includes metadata and doesn't contain machine code for generic and #[inline] functions.
Fair point. I suppose a statically-compiled binary would work, but we'd need to figure out first how to use elfmalloc as the global Rust allocator, which we haven't yet done.
This sounds like you only benchmarked it on WSL? No pure Linux or Windows benchmarks? Especially the latter would be interesting, as AFAIK Rust doesn't use jemalloc on Windows.
The highest-core machine we have access to only has a Windows partition. While I should get around to getting a native Linux partition, it hasn't happened yet and I'm not sure when I'll have time to sit down and get everything working.
As for Windows, we are working on getting support for it! The biggest hurdle we will have to address is the way Windows handles uncommitted memory. But we are pretty sure how to support this configuration, so stay tuned!
Would it be possible to dual-license under the MIT license as well? That would allow it to be used by the Rust compiler distribution, as well as by the Redox operating system.
If I'm not mistaken, this shouldn't be a problem - the Apache 2.0 license allows arbitrary use and redistribution so long as there's attribution, so Rust and Redox should both be able to use it. The same is true, for example, with LLVM, which uses neither Apache 2.0 nor MIT, but is still used by Rust.
OK, we've decided to go ahead with it. Since our contributors hold individual copyright, we'll need their permission first, but assuming we get that, we'll dual-license.
It's always nice to see how things can quickly be resolved in the OpenSource world. Not meetings. No self-flagellation. Just discussion, decision, execution!