News for hackers. Stuff that matters.
Re:The lost malloc() by StilesCrisis on Wednesday November 04, 2026 @07:54AM (#50364882)
Don't worry, the allocator almost never dedicates actual heap space towards storing your allocation sizes. Instead, allocations get bucketed by size, and you can derive the size by working out which bucket the allocation is in. This is cheap and the bucketing is a good strategy anyway.
Re:The lost malloc() by senderista on Wednesday November 04, 2026 @12:05PM (#50368489)
Unfortunately, "boundary tags" containing allocation size are still pretty common in dlmalloc-derived implementations like glibc, although slab allocators like you described are the preferred approach for most new implementations.