tcmalloc
By google
mimalloc
mimalloc is a compact general purpose allocator with excellent performance. (by microsoft)
tcmalloc | mimalloc | |
---|---|---|
15 | 35 | |
4,081 | 9,499 | |
1.4% | 1.6% | |
9.8 | 9.1 | |
3 days ago | 7 days ago | |
C++ | C | |
Apache License 2.0 | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
tcmalloc
Posts with mentions or reviews of tcmalloc.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-06.
-
Configuring HugePages on Google's TCMalloc
https://github.com/google/tcmalloc/issues/190
-
Configuring HugePages on TCMalloc
I had earlier raised a query on the github.com/google/tcmalloc regarding how I can force tcmalloc to back memory with hugetlbfs instead of using Transparent Huge Pages. I have attached the link to my query below. Please let me know if there is an possible way to do this.
-
New memory related fields in Yugabyte 2.17.3 pg_stat_activity
The allocated_mem_bytes field shows the memory allocated by the memory allocator. PostgreSQL is setup in an extensible way, which includes the ability to choose a memory allocator, which for PostgreSQL is ptmalloc, and for YSQL is tcmalloc. PostgreSQL has the ability to change the memory allocator, but by default uses the operating system memory allocator.
-
Spotting and Avoiding Heap Fragmentation in Rust Applications
> * Switching from libc malloc to tcmalloc (dating myself a little bit)
If you think of tcmalloc as an old crusty allocator, you've probably only seen the gperftools version of it.
This is the version Google now uses internally: https://github.com/google/tcmalloc
It's worth a fresh look. In particular, it supports per-CPU caches as an alternative to per-thread caches. Those are fantastic if you have a lot more threads than CPUs.
-
I've had bad luck with transparent hugepages on my Linux machines
The default setting of max_ptes_none is also problematic.
On a stock kernel, it's 511. TCMalloc's docs recommend using max_ptes_none set to 0 for this reason: https://github.com/google/tcmalloc/blob/master/docs/tuning.m...
(Disclosure: I work on TCMalloc and authored the above doc.)
-
Pages Are a Good Idea
The easiest way to exploit THP, by far, is to link your program against TCMalloc and forget about it. Literally free money. Highly recommended.
https://github.com/google/tcmalloc
- Why tcmalloc using aggresive decommit == false is a litte better than jemalloc
- System memory allocator free operation zeroes out deallocated blocks in iOS 16
-
malloc() and free() are a bad API
This means that efficient malloc implementation is typically overly complicated. mimalloc for example is almost 8K lines of C afaik, which is one of the smaller but still efficient malloc implementation I'm aware of. (Try looking into tcmalloc for comparison).
-
malloc global mutex?
Yes, it is synchronized, you can also swap out the implementation typically. There are different allocators out there depending on what you are trying to optimize for (memory, single thread performance, multithread performance, locality, etc). A lot of multithreading optimized ones use per thread pools, so each individual allocation doesn't need to globally lock, but changing the pools themself does, or large allocations that aren't part of the pools. For example https://github.com/google/tcmalloc
mimalloc
Posts with mentions or reviews of mimalloc.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-11-14.
- 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
-
Rust Mimalloc v0.1.31 has just been released!
Version 0.1.31 of the Rust wrapper for the mimalloc memory allocator has just been released!