logoalt Hacker News

inigyoutoday at 11:06 AM1 replyview on HN

These still exist, like dlmalloc, jemalloc, tmalloc (which has new features). Built-in malloc is good enough for almost everything if you don't have excessive time on your hands, but thinking deeper about memory allocation is one of those things that can make your software higher quality if you have time for it—just like utilising SIMD (also on today's front page) or careful use of caching.


Replies

AndrewStephenstoday at 12:10 PM

Alternative allocators could make a huge difference to the runtime performance. When multithreading on real multiprocessor systems started to become a thing it was common that all your carefully written threads ended up waiting on the allocator mutex. The win32 heap was particularly prone to this.

Third party allocators improved on this as well as usually avoiding the heap fragmentation problems that system heaps often suffered from back then.

These days the system heaps have improved to a point where you really only need to think about a third party heap for very specialized circumstances. They do usually come with nifty debugging tools though.

show 1 reply