for_each_res...d_mem_region(9)
πΈ for_each_reserved_mem_region(9) πΈ
ok so real talk, bestie β this is a page from the Kernel API Manual, and the full name got chopped in the header (for_each_res...d_mem_region(9), screaming π), but the actual macro is for_each_reserved_mem_region and she is literally the icon of reserved memory. Let's get into it π«Ά
β¨ NAME β¨
for_each_reserved_mem_region β iterate over reserved memory regions π
like, it's giving "for each reserved memory region, do the thing." main character loop energy, no cap.
π¦ SYNOPSIS π¦
for_each_reserved_mem_region (region );
that's it. that's the whole vibe. one argument, in and out π
π ARGUMENTS π
regionβ the loop variable, bestie! it's the little guy that gets handed each reserved memory region as the loop goes around. iykyk π
β SEE ALSO β
ok this is the part where the manpage name-drops literally everyone in the friend group. all of these live in the kernel file ./include/linux/memblock.h:
enum memblock_flags(9)struct memblock_region(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)
note that the whole squad is listed above β don't come for me if you wanted a shorter list, the original said all of them and we keep all of them π₯
and that's the page, diva π huge thank you to ./include/linux for hosting, and a very happy October 2026 to you all β this has been for_each_res...d_mem_region(9), signing off πβ¨πΈ
π¦ 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