Hacker News new | ask | show | jobs
Doug Lea's Malloc (gee.cs.oswego.edu)
17 points by grep_it 3 days ago
4 comments

It was a good single-threaded allocator back in the day but in the multicore era the design is now thoroughly obsolete. I suggest reading e.g. the jemalloc[1] and mimalloc[2] papers if you want to understand how modern allocators are implemented.

[1] https://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemal...

[2] https://www.microsoft.com/en-us/research/wp-content/uploads/...

Considering that global allocators are usually an anti-pattern and that most applications should have component-specific allocators, dlmalloc isn't all that bad when used through its mspace API. Of course, if one doesn't actually need a general allocator, they should simply use an arena allocator.
In the mid 2000s I was a student in upstate NY and I very briefly met Doug Lea. (I'm 100% sure he doesn't remember me at all.) He was a very warm, approachable, down to earth guy. The computer labs at Oswego had a bunch of giant Sun Microsystems logos on all the gear, I guess because they were funding him.
I believe this was the original malloc used in Android's bionic libc.
The only algorithm to be named after someone's full name, first and last name