snmalloc
Mesh
snmalloc | Mesh | |
---|---|---|
9 | 6 | |
1,584 | 1,756 | |
0.7% | 0.5% | |
7.2 | 6.3 | |
7 days ago | 5 months ago | |
C++ | C++ | |
MIT License | Apache License 2.0 |
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 ?
Mesh
-
Spotting and Avoiding Heap Fragmentation in Rust Apps
I'm not sure if it's widely used, but Mesh is a C/C++ library that can recover from memory fragmentation. The YouTube video in the README is a great watch.
-
Compacting the Uncompactable: The Mesh Compacting Memory Allocator
From 2019. Here it is on Github: https://github.com/plasma-umass/Mesh
-
Bizarre memory leak caused by tokio runtime
With everyone talking about memory fragmentation, I'd like to mention Mesh, an allocator that can compact aka defrag the heap without any help from the program or compiler. Here's the talk explaining it, "Compacting the Uncompactable" by Bobby Powers.
- Reference Count, Don't Garbage Collect
-
How do applications request for RAM from the CPU?
Mesh by Bobby Powers
What are some alternatives?
mimalloc - mimalloc is a compact general purpose allocator with excellent performance.
jemalloc
jemallocator - Rust allocator using jemalloc as a backend
mimalloc_rust - A Rust wrapper over Microsoft's MiMalloc memory allocator
memory - STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.
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
rmm - RAPIDS Memory Manager
jemallocator - Rust allocator using jemalloc as a backend
ixy-languages - A high-speed network driver written in C, Rust, C++, Go, C#, Java, OCaml, Haskell, Swift, Javascript, and Python