What is malloc doing, anyway?

20 points by thasso


thasso

This is a fairly nice introduction to memory allocation and the syscalls used to implement a memory allocator in a typical Unix userspace.

A nice addition would be a discussion of the binary buddy allocation scheme, which is a fairly simple and elegant algorithm, which is used in some real physical memory allocators (eg Linux). The algorithm is featured in volume 1 of Knuth’s Art of Computer Programming, if someone is interested.