Principal data structures that are elementary for entire memory management framework are zones and nodes. Let's familiarize ourselves with core concepts behind these data structures.
Zones and nodes
Memory zones
For efficient management of memory allocations, physical pages are organized into groups called zones. Pages in each zone are utilized for specific needs like DMA, high memory, and other regular allocation needs. An enum in kernel header mmzone.h declares zone constants:
/* include/linux/mmzone.h */
enum zone_type {
#ifdef CONFIG_ZONE_DMA
ZONE_DMA,
#endif
#ifdef CONFIG_ZONE_DMA32
ZONE_DMA32,
#endif
#ifdef CONFIG_HIGHMEM
ZONE_HIGHMEM,
#endif
ZONE_MOVABLE,
#ifdef CONFIG_ZONE_DEVICE
ZONE_DEVICE,
#endif
__MAX_NR_ZONES
};
ZONE_DMA...