At the very end of Kernighan & Ritchie's book the The C Programming Language, a storage allocator is described. It says
Each block contains a size, a pointer to the next block, and the space itself.
But I don't see that in the code:
typedef long Align; /* for alignment to long boundary */
union header { /* block header */
struct {
union header *ptr; /* next block if on free list */
unsigned size; /* size of this block */
} s;
Align x; /* force alignment of blocks */
};
typedef union header Header;
The pointer to the next block is *ptr
and the size is unsigned size
but which variable is the space itself? Is the space itself the variable x
?