Bin's Tech Cabin
Bin's Tech Cabin
Dec 28, 2022 · Fundamentals

How Linux Allocates Physical Memory: Inside the Kernel’s Buddy Allocator

This article walks through Linux kernel physical memory allocation, explaining the hierarchy of allocation interfaces, the role of gfp_mask and ALLOC flags, the fast and slow allocation paths, memory watermarks, NUMA zone handling, and the complex fallback mechanisms including compaction, direct reclaim, and OOM, all illustrated with code snippets and diagrams.

Buddy AllocatorLinuxNUMA
0 likes · 68 min read
How Linux Allocates Physical Memory: Inside the Kernel’s Buddy Allocator