Understanding the Linux Virtual Memory Manager
by Mel Gorman · kernel.org (originally Prentice Hall, 2004)
Book-length walkthrough of how a production kernel manages memory, based on Linux 2.4 with notes on 2.6. Covers physical memory zones, page tables, the buddy allocator, the slab allocator, non-contiguous allocation, page frame reclaim, and swap. Free under the Open Publication License. Caveat: it targets the 2.4/2.6 era, so specific code paths are outdated, but the architecture (zones, buddy, slab, reclaim) still matches Linux's design.
More resources on Memory Management
OSDev Wiki - Memory Management
Community wiki overview for hobbyist kernel developers, explaining physical and virtual address spaces, segmentation, paging, and allocator design, with links to implementation pages. Readers gain the vocabulary and design choices needed to write their own kernel's memory manager.
xv6 OS Source
MIT's small Unix-like teaching kernel for RISC-V, published with source code and a companion commentary book. Reading and modifying it shows concretely how page tables, kernel and user address spaces, physical page allocation, and traps are implemented.
Dynamic Storage Allocation: A Survey and Critical Review
The authoritative deep source for the 'allocation' part of the topic. Survey of memory allocator research from 1961 to 1995. Separates allocator policy from mechanism, analyzes fragmentation, and reviews sequential-fit, segregated-list, buddy and other designs, along with how allocators have been evaluated. Over 150 references.
What Every Programmer Should Know About Memory
A 114-page paper on the memory subsystem as software sees it: DRAM, CPU caches, virtual memory and page-table walk costs, TLBs and huge pages, NUMA, and how programs and kernels can improve memory access performance. Covers the hardware and performance costs of virtual memory (page walks, TLB misses, NUMA placement) that OS textbooks treat only briefly. Some hardware details date from 2007, but the principles still hold and nothing free covers the same ground as well.
osdev.org
OSDev.org is a community-driven resource and wiki for operating system development. It offers tutorials, articles, and sample code on topics like kernels, bootloaders, memory management, drivers, and other low-level OS concepts, plus forums for discussion.