memblock_set_current_limit(9)
πΈ memblock_set_current_limit(9) πΈ
okay bestie, welcome to the Kernel API Manual β yes we're literally reading kernel docs together, this is our bonding time π
β¨ NAME β¨
memblock_set_current_limit β set the current allocation limit so you can cap allocations to only what's actually accessible while the kernel is booting π
π¦ SYNOPSIS π¦
void memblock_set_current_limit (phys_addr_t limit );
π ARGUMENTS π
limitβ the new limit value, and it's a physical address. that's it, that's the whole vibe β¨
π SEE ALSO π
first up, the file itself lives at ./include/linux/memblock.h β go say hi π«Ά
and then the whole friend group, no cap, every single one:
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_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)
like, the whole memblock extended universe π₯ iykyk
lowkey the whole point of this one: you're limiting allocations to what's currently accessible during boot. it's giving "guardrails but make it physics" π
and that's the page, bestie!! mwah ππ this little slice of kernel lore comes from the source ./include/linux and is dated October 2026 β stay slay, stay booting, periodt π§ββοΈβ
π¦ 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