Best of 2026

The blog posts Hacker News loved most in 2026. 3,704 posts.

Any topic
1568

What is malloc doing, anyway?

malloc has a very nice and simple interface: you ask for a certain amount of memory, and you’re given a void pointer to your block of contiguous bytes that’s been magicked into existence. Once you’re done with it, you call free with the same pointer and the memory disappears into the ether.