# Doug Lea's malloc became Linux's default allocator and nobody even named it

> Hacker News story 50651289 · language: en · submitted 2026-11-26
> Web version: https://zeli.app/story/50651289
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 20 · by [grep_it](<https://news.ycombinator.com/user?id=grep_it>) · 💬 5
[original](<https://gee.cs.oswego.edu/dl/html/malloc.html>) · [HN discussion](<https://news.ycombinator.com/item?id=50651289>)

## Summary

Doug Lea started writing a memory allocator in 1987 after his C++ programs ran slower and consumed more memory than expected on SunOS and BSD. The result, dlmalloc, became the default native malloc in some Linux versions and was compiled into many packages. Lea explains the design goals—compatibility, portability, space and time efficiency, tunability, locality, and error detection—and the trade-offs behind boundary tags, size-sorted bins, and best-fit with coalescing.

## Key quote

> For an extreme example, among the fastest possible versions of malloc() is one that always allocates the next sequential memory location available on the system, and the corresponding fastest version of free() is a no-op. However, such an implementation is hardly ever acceptable: it will cause a program to run out of memory quickly since it never reclaims unused space.

## HN discussion (5 comments)

### [senderista](<https://news.ycombinator.com/item?id=50685042>)

> 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/...

### [asveikau](<https://news.ycombinator.com/item?id=50685005>)

> 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.

### [acyclic](<https://news.ycombinator.com/item?id=50653182>)

> The only algorithm to be named after someone's full name, first and last name

---

## Cite

- Page: https://zeli.app/story/50651289
- Date: 2026-11-26
- Source: gee.cs.oswego.edu (https://gee.cs.oswego.edu/dl/html/malloc.html)
- Hacker News: https://news.ycombinator.com/item?id=50651289

## Other languages

- zh: https://zeli.app/zh/story/50651289 · markdown: https://zeli.app/zh/story/50651289.md
- ja: https://zeli.app/ja/story/50651289 · markdown: https://zeli.app/ja/story/50651289.md
- ko: https://zeli.app/ko/story/50651289 · markdown: https://zeli.app/ko/story/50651289.md
- de: https://zeli.app/de/story/50651289 · markdown: https://zeli.app/de/story/50651289.md
- es: https://zeli.app/es/story/50651289 · markdown: https://zeli.app/es/story/50651289.md
- ru: https://zeli.app/ru/story/50651289 · markdown: https://zeli.app/ru/story/50651289.md
