STRUCT MEMBLOCK_TYPE(9)
π struct memblock_type(9) π
okay so bestie, welcome to the Kernel API Manual β this is the page for struct memblock_type, which is literally the whole concept of "a collection of memory regions of certain type". like, that's it, that's the vibe. one struct, one job. iconic.
β¨ NAME β¨
struct memblock_type β a collection of memory regions of certain type π«Ά
π SYNOPSIS π
struct memblock_type {
unsigned long cnt;
unsigned long max;
phys_addr_t total_size;
struct memblock_region *regions;
char *name;
};
πΈ Members πΈ
cntβ the number of regions. how many we actually got. the headcount πmaxβ the size of the allocated array. like, the capacity we've committed to, not the number of guests who showed up.total_sizeβ the size of all regions. all of them. together. the whole squad combined π₯regionsβ the array of regions. this is the actual list, the main character of the whole struct ngl πnameβ the memory type symbolic name. so it knows what to call itself. labels are self-care β¨
π¦ SEE ALSO π¦
Kernel file ./include/linux/memblock.h, plus literally all of these besties:
enum memblock_flags(9)struct memblock_region(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)
ngl that's a lot of macro besties. go read them, they miss you. π
so yeah, that's the whole page β straight out of ./include/linux, dated October 2026, and delivered to you with love from the Kernel API Manual. go be a linux girlie, you've got this ππ
π¦ 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