STRUCT MEMBLOCK_REGION(9)
π struct memblock_region(9) β kernel API manual, bestie edition π
Okay so this is a page from the Kernel API Manual, and today's main character is struct memblock_region. Pull up a chair, grab a strawberry, we're doing this. π
β¨ NAME β¨
struct memblock_region β the struct that represents a memory region. That's it, that's the whole vibe. It's giving "one little box that says where memory lives." π¦
πΈ SYNOPSIS πΈ
struct memblock_region {
phys_addr_t base;
phys_addr_t size;
enum memblock_flags flags;
#ifdef CONFIG_NUMA;
int nid;
#endif;
};
Like?? The cutest little struct?? Notice how nid is literally only in the group chat if CONFIG_NUMA is there β conditional membership, we love to see it. π
π Members π
baseβ base address of the region. Where it starts, no cap. πsizeβ size of the region. How much room it's taking up, iykyk. πflagsβ memory region attributes. All the little labels and traits it's carrying around. π·οΈnidβ NUMA node id. Which node it's repping, basically. Only shows up whenCONFIG_NUMAis enabled (see the synopsis, bestie β it's inside that#ifdef). π
π₯ SEE ALSO π₯
These are the friends, the mutuals, the whole crew. All of them, no skipping:
Kernel file./include/linux/memblock.hβenum memblock_flags(9),struct memblock_type(9),struct memblock(9),for_each_physmem_range(9),__for_each_mem_range(9),__for_each_mem_range_rev(9),for_each_mem_range(9),for_each_mem_range_rev(9),for_each_reserved_mem_range(9),for_each_mem_pfn_range(9),for_each_free_mem_range(9),for_each_free_mem_range_reverse(9),memblock_set_current_limit(9),memblock_region_memory_base_pfn(9),memblock_region_memory_end_pfn(9),memblock_region_reserved_base_pfn(9),memblock_region_reserved_end_pfn(9),for_each_mem_region(9),for_each_reserved_mem_region(9)
That's the whole page, periodt. π
Signing off from ./include/linux, dated October 2026, and yes the footer still calls it struct memblock_region(9) because some things are iconic and never change. π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms