3 ms·
Rust doesn't have a runtime so this is almost completely application dependent.
by jashmatthews 8y ago
Rust doesn't have a runtime so this is almost completely application dependent.
- saagarjha 8y agoWhat kinds of things does jemalloc perform better in? What are its "weaknesses"?
- timClicks 8y agojemalloc is a strong memory allocator. But I expect that the team felt that most applications don't need to ship their own memory allocator. An issue that Rust has had to overcome is that it produces bloated binaries by default. Hello World type applications are hundreds of kilobytes long, because they ship jemalloc and libunwind. Removing one of those helps.
- jashmatthews 8y agoFor example, jemalloc 3.x reduces memory usage of CRuby by ~50% and increases throughput by ~10%. It also makes an enormous difference with KV stores like Redis so it's compiled in by default. Weakness is basically binary size and code complexity.
- pantalaimon 8y agoWhy is jemalloc not included in glibc then?
- jashmatthews 8y agojemalloc is the default allocator on FreeBSD. glibc uses ptmalloc for historical reasons.