What is malloc doing, anyway?
0 comments
- Points219
- Comments61
0 comments
Story details from Hacker News ↗ · linked article on benmandrew.com.
What is malloc doing, anyway? was first seen on Hacker News · Front page on Nov 9, 2026. Since then it has appeared in 68 checks on 2 different days. Its best position was #6 of 30, reached on Nov 9, 18:54 UTC. It dropped off the list after Nov 10, 05:39 UTC. The same link also trended on Lobsters, which raises its cross-platform score.
Position on Hacker News · Front page at every check (lower is better).
Best rank per day (UTC).
Platform metric as reported by Hacker News.
| List | Best | Days | Checks | Last seen |
|---|---|---|---|---|
| Hacker News · Front page | #6 | 2 | 68 | |
| LLobsters · Hottest What is malloc doing, anyway? | same link | |||
A few top-level comments from Hacker News, shortened. Read the full thread on Hacker News.
Tangential, but the complexity and over-head of the malloc abstraction is precisely what made me very intrigued by "stack-only" languages, such a recently published Goose. There is something very elegant and exciting about the idea of (almost) completely getting rid of it. Just as modern programming languages have…
This is mostly describing a kind of obsolete allocator that uses the brk to adjust a single contiguous heap range. This is basically irrelevant with virtual memory and mmap. The good malloc impls (jemalloc, mimalloc) don't do this.
I tried this on OpenBSD using ktrace / kdump. I added some utrace calls and had to increase the amount allocated significantly to get the mmap calls to show up. obsd just calls mmap with prot_read|prot_write meaning pages may be read/written.
Archived daily, weekly and monthly lists that include this entry.
Not at the moment. It was last on the list on Nov 10, 05:39 UTC, after 2 days of trending.
#6 on Hacker News · Front page, on Nov 9, 18:54 UTC. Trendoday checks this list every 15 minutes.
It was first seen on Nov 9, 2026 and has been on the list on 2 days (68 checks) since.
219 points and 61 comments; submitted by benmandrew on Nov 9, 2026.