4

I have replaced Windows 7's system allocator both with tcmalloc and jemalloc but I see that the system allocator performs better on a multithreaded app. In case of tcmalloc it seems that system alloc is about 10% faster in malloc and free operations when running 8 threads. I used Intel's vtune for this analysis. Is there any study out there which compares windows allocator against the other allocators or is there some kind of tuning that I need to do on these allocators that would improve results?

user1447647
  • 49
  • 1
  • 2
  • 1
    I didn't even know that Windows 7's system allocator could be easily replaced - I thought it was all closed-source. – Martin James Apr 15 '14 at 23:07
  • 5
    The only meaningful benchmark results for selection of memory allocators are those of your own application that you intend to link against it. There is no generally 'faster' or 'slower' allocator for all purposes. – Phil Miller Apr 15 '14 at 23:26
  • @MartinJames: If you have code that is functionally (from a "black box" view of the system) and name-wise the same as that of MS's supplied code, it's just a matter of putting it "before" the C/C++ runtime library/-ies in the linking - the same obviously applies in most other environments. Such a allocator library can be quite different internally, such as using a completely different strategy for sizing/combining allocations. – Mats Petersson Apr 15 '14 at 23:34
  • 1
    http://locklessinc.com/benchmarks_allocator.shtml – arunmoezhi Apr 16 '14 at 00:09
  • @arunmoehzi Yes I have already seen lockless' results. Unfortunately their benchmarks are based on Vista. – user1447647 Apr 16 '14 at 01:40
  • Why do you want to improve tcmalloc or jemalloc when the system allocator is already faster? What's the goal? – Adrian McCarthy Jun 19 '17 at 21:58

0 Answers0