for_each_memory_block(9)
β¨ NAME β¨
for_each_memory_block β walk through all present memory blocks πΆββοΈπ
Okay so this is for_each_memory_block(9) from the Kernel API Manual, bestie. Group chat is open, let's go. π
πΈ SYNOPSIS πΈ
int for_each_memory_block (void *arg , walk_memory_blocks_func_t func );
π ARGUMENTS π
argβ the argument that gets passed tofuncπ«Άfuncβ the callback for each memory block walked β¨
π¦ DESCRIPTION π¦
So like, for_each_memory_block literally walks through all present memory blocks and calls func on each memory block. It's giving βone by one, no block left behind.β π
And if func returns an error, walking is aborted and the error is returned. Not me getting emotionally invested in the walk only for it to stop early π but yes, that's the deal.
π₯ SEE ALSO π₯
Kernel file ./drivers/base/memory.c and these other pages, bestie:
memory_block_advise_max_size(9)memory_block_advised_max_size(9)memory_block_add_nid_early(9)walk_memory_blocks(9)memory_group_register_static(9)memory_group_register_dynamic(9)memory_group_unregister(9)
Sign-off time π: source/version is ./drivers/base, date is October 2026, and the page is for_each_memory_block(9) πβ¨
π¦ 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