jemalloc
mimalloc
jemalloc | mimalloc | |
---|---|---|
42 | 36 | |
9,602 | 10,656 | |
0.9% | 1.0% | |
8.7 | 9.4 | |
5 days ago | 3 days ago | |
C | C | |
GNU General Public License v3.0 or later | 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.
jemalloc
-
Show HN: Rust Web Framework
jemalloc (as opposed to GNU libc and LLVM) sometimes performs better. [1]
[1] https://jemalloc.net/
-
Training AI Models on CPU on AWS EC2
There are a number of opportunities for optimizing the use of the underlying CPU resources. These include optimizing memory management and thread allocation to the structure of the underlying CPU hardware. Memory management can be improved through the use of advanced memory allocators (such as Jemalloc and TCMalloc) and/or reducing memory accesses that are slower (i.e., across NUMA nodes). Threading allocation can be improved through appropriate configuration of the OpenMP threading library and/or use of Intel's Open MP library.
-
Adding 16 KB Page Size to Android
Certain build processes determine the page size at compile time and assume it's the same at run time, and fail if it is not: https://github.com/jemalloc/jemalloc/issues/467
Some memory-mapped files formats have assumptions about page granularity: https://bugzilla.redhat.com/show_bug.cgi?id=1979804
The file format issue applies to ELF as well. Some people patch their toolchains (or use suitable linker options) to produce slightly smaller binaries that can only be loaded if the page size is 4K, even though the ABI is pretty clear in that you should link for compatibility with up to 64K pages.
-
Mimalloc Cigarette: Losing one week of my life catching a memory leak (Rust)
jemalloc has its own problem with threads - if you have a multi-threaded application that uses jemalloc on all threads except the main thread, then the cleanup that jemalloc runs on main thread exit will segfault. In $dayjob we use jemalloc as a sub-allocator in specific arenas (the rest of the application uses libc malloc, but for some cases it allocates pages using mmap and then uses jemalloc to partition them). $dayjob's code is written in Rust, whose unit test framework defaults to running tests in one or more threads and the main thread of the test binary just orchestrates them. So the test binary triggers this segfault reliably.
( https://github.com/jemalloc/jemalloc/issues/1317 Unlike what the title says, it's not Windows-specific.)
-
Resource observability case study: jemalloc in Android builds
As a demonstration, I want to measure something that caught my attention months ago—an interesting topic brought up by Jason Pearson: the use of jemalloc as a native memory allocator for Android builds. The initial claim is that this usage brings a reduction in memory usage by optimizing how memory is allocated and deallocated. jemalloc is designed to minimize memory fragmentation and improve performance, particularly in multithreaded applications, making it ideal for resource-intensive builds.
- Userland Rootkits Are Lame
- Show HN: Comprehensive inter-process communication (IPC) toolkit in modern C++
-
Finding memory leaks in Postgres C code
jemalloc as well has some handy leak / memory profiling abilities: https://github.com/jemalloc/jemalloc/wiki/Use-Case%3A-Heap-P...
-
Speed of Rust vs. C
The worst memory performance bug I ever saw turned out to be heap fragmentation in a non-GC system. There are memory allocators that solve this like https://github.com/jemalloc/jemalloc/tree/dev but ... they do it by effectively running a GC at the block level
As soon as you use atomic counters in a multi-threaded system you can wave goodbye to your scalability too!
-
Understanding Mesh Allocator
The linked talk video mentioned they're playing with it in jemalloc and tcmalloc.
I found this https://github.com/jemalloc/jemalloc/issues/1440 but couldn't find tcmalloc doing similar.
These guys are aware of mesh and compare against it: https://abelay.github.io/6828seminar/papers/maas:llama.pdf
mimalloc
-
Improve an algorithm performance step by step
Switching to jemalloc or mimalloc doesn't improve the performance either.
- Mimalloc: High performance general purpose allocator
-
Replacing musl's malloc with mimalloc: any ideas?
mimalloc: mimalloc is an open source implementation of malloc, currently the best performing allocator.
-
Reptar
Some compiler writers thought that was the case, if [0] is related to OP. I don't have a "modern" (after 6th gen) Intel CPU to test it on, but note that most programs are compiled for a relatively generic CPU.
[0]: https://github.com/microsoft/mimalloc/issues/807
-
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.
-
Z Garbage Collector: The Next Generation
Memory management for C is not itself a solved problem, not only is there a lot of performance to squeeze out of malloc itself (the benchmarks on https://github.com/microsoft/mimalloc exemplifies the variance between the implementations), but it's up to the programmer to implement memory management in the large in an efficient way, which is not an easy task. One sure mark of a slow C program is one with a ton of mallocs and frees strewn all over.
-
Linux Tech Tips EP#13: Testing Transparent Huge Pages and Cryo Utilities in Gaming | 3700X 6600XT
It's a very terse howto for replacing Factorio's memory allocator with Microsoft's mimalloc, and configuring mimalloc so that memory is always allocated on huge pages by using madvise().
-
Differences between Lean4 and Koka reference counting
I was wondering if Koka's perceus referencing counting style is any different from the reference counting that Lean4 implements? I understand that both rely upon the mimalloc (https://github.com/microsoft/mimalloc) library in the backend.
-
pmr implementation in c++14
If you are fine with heap allocations then there are only few dozens operator new/delete to override to regain control over normal C++ code memory use. Allocators and STL all need to call those. At least that's what gaming does on all platforms. If you need examples you can check Mimalloc on github ( https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-new-delete.h ).
-
GitHub link to an Arma 3 allocator which increases performance by 20-50%
What's the difference between this and Microsoft's? https://github.com/microsoft/mimalloc
What are some alternatives?
tbb - oneAPI Threading Building Blocks (oneTBB) [Moved to: https://github.com/oneapi-src/oneTBB]
rpmalloc - Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C
rust-scudo
snmalloc - Message passing based allocator
rust - Empowering everyone to build reliable and efficient software.
Hoard - The Hoard Memory Allocator: A Fast, Scalable, and Memory-efficient Malloc for Linux, Windows, and Mac.
gperftools - Main gperftools repository
Redis - Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
hardened_malloc - Hardened allocator designed for modern systems. It has integration into Android's Bionic libc and can be used externally with musl and glibc as a dynamic library for use on other Linux-based platforms. It will gain more portability / integration over time.