Tech article
What is malloc doing, anyway?
Hacker News | Nov 9, 2026 | benmandrew
Automated excerpt
When no free chunk fits, grow_heap moves the program break up in 64 KiB steps using sbrk and puts the new space on the free list as one chunk. Whether a free chunk still costs RAM depends on when the kernel puts physical memory behind an address. A live chunk holds the break above it, so every free chunk below it stays resident, as the 1 MiB block did here.
Selected automatically from source text; not independently written or fact-checked. Read the original for full context.