Programming · by Camille Dubois · 2026-11-04
The lost malloc(): early Unix allocated from explicit regions and free took a size
Neat archaeology post. Early Unix kernel malloc()/mfree() worked on explicit memory maps, and mfree() got told the size of what it was freeing. The author argues that's a better interface than modern malloc/free: you could hand a library its own region, drop it all at once, cap third party memory, and contain heap corruption. Basically arenas, 50 years ago. Would you actually want a region-first allocator API in libc today?
20 sparks · 2 comments