What is malloc doing, anyway?
benmandrew.com

What is malloc doing, anyway?

The gist

Developer Ben M. Andrew published an article explaining how malloc gets memory from the kernel.
The piece walks through building a memory allocator, a core topic for C programmers.

How it unfolded

  1. Nov 8, 2026Ben M. Andrew publishes "What is `malloc` doing, anyway?", an introduction to memory allocation and the syscalls used to implement an allocator in a typical Unix userspace.
  2. Nov 9, 2026The article is submitted to Lobsters, where a commenter suggests adding a discussion of the binary buddy allocation scheme.
  3. Nov 9, 2026The article is posted to Hacker News by benmandrew with 5 points.

Key terms

malloc
A C standard library function that allocates a block of dynamic memory.
memory allocator
A component that manages allocation and freeing of memory for programs at their request.
system calls
A programmatic interface through which a program requests services from the operating system kernel.

Source: Wikipedia

Sources

Read the full story in the app Gistline — free on the App Store