Having looked at how physical memory is organized, and represented through core data structures, we will now shift our attention to management of physical memory for processing allocation and deallocation requests. Memory allocation requests can be raised by various entities in the system, such as usermode process, drivers, and filesystems. Depending on the type of entity and context from which allocation is being requested, allocations returned might need to meet certain characteristics, such as page-aligned physically contiguous large blocks or physically contiguous small blocks, hardware cache aligned memory, or physically fragmented blocks that are mapped to virtually contiguous address space.
To efficiently manage physical memory, and cater to memory as per chosen priority and pattern, the kernel engages with a group of memory allocators. Each allocator...