snmalloc
mimalloc_rust
snmalloc | mimalloc_rust | |
---|---|---|
9 | 6 | |
1,584 | 524 | |
0.7% | 2.3% | |
7.2 | 7.1 | |
7 days ago | 3 months ago | |
C++ | Rust | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
snmalloc
- Hardening Snmalloc
-
Snmalloc: A Message Passing Allocator
https://github.com/microsoft/snmalloc#snmalloc mentions two biggest motivations as:
> Allocations on one thread are freed by a different thread
I can imagine one use-case for this: a task that is scheduled from and executed by a work-stealing thread-pool can allocate memory in one thread but by design there's no guarantee that the memory will be necessarily freed from that exact thread. Would that be a good use-case for snmalloc?
> Deallocations occur in large batches
This sounds much like a bump allocator use-case but which can do this exact thing by calling a single munmap(addr, len) and unmap multiple allocations all at once.
-
Is the JVM a upside or downside to Scala?
Yes, it's very efficient and that's not where the main problem lies. However, small allocations with modern C heap allocators like mimalloc or snmalloc has gotten extremely efficient as well. Would be interesting to see a benchmark comparison with Java's G1 and ZGC.
- Snmalloc 0.6 released, major redesign with security hardening
- Snmalloc: High-performance message passing based allocator
-
Maintenance status (jemallocator)
Did you ever benchmark against https://github.com/microsoft/snmalloc ?
mimalloc_rust
-
Rust std:fs slower than Python
> I wish Rust would switch to mimalloc or the latest tcmalloc (not the one in gperftools).
That's nonsensical. Rust uses the system allocators for compatibility, not because they're good (they were not when Rust switched away from jemalloc, and they aren't now).
If you want to use mimalloc in your rust programs, you can just set it as global allocator, that takes all of three lines: https://github.com/purpleprotocol/mimalloc_rust#usage
-
Hey Rustaceans! Got a question? Ask here (15/2023)!
Context: When using mimalloc as global allocator, linking with crt-static fails with the following error:
-
Tips on scaling a monolithic Rust web server?
Use an optimized memory allocator, my choice is mimalloc. It wins every time I compare it, even against jemalloc (not to mention it supports arena hardening which is good for security).
-
Rust Mimalloc v0.1.30 has just been released!
Version 0.1.19 of the Rust wrapper for the mimalloc memory allocator has just been released!
-
Maintenance status (jemallocator)
I'll mention that mimalloc (+ Rust wrapper) is great alternative to jemalloc.
- Introducing Rust Bindings for the Scudo Hardened Allocator
What are some alternatives?
mimalloc - mimalloc is a compact general purpose allocator with excellent performance.
rust-scudo
jemallocator - Rust allocator using jemalloc as a backend
jemalloc
o1heap - Constant-complexity deterministic memory allocator (heap) for hard real-time high-integrity embedded systems. There is very little activity because the project is finished and does not require further changes.
rpmalloc - Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C
jemallocator - Rust allocator using jemalloc as a backend
rfc-leadership-council - RFCs for changes to Rust
Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.
opendal - Apache OpenDAL: One Layer, All Storage.