Memory Allocation

Memory allocation is the process by which programs allocate space to their various tasks. This post details the basics of memory allocation and how to write your own allocator. The article explains how programs request and return memory using the malloc and free functions. Memory is represented as a sequence of bytes, and the simplest malloc implementations allocate space in sequence, without freeing any memory. To keep better track of memory, allocation lists and free lists are maintained, with the latter allowing for coalescing to combat fragmentation. Inline bookkeeping stores information next to blocks of memory and is used in boundary tag allocators.

https://samwho.dev/memory-allocation/

To top