kexec_walk_resources(9)
π kexec_walk_resources(9) π
okay so bestie, welcome to the Kernel API Manual β¨ this little cutie is called kexec_walk_resources, and it's giving "let's take a stroll through memory" energy πΆβοΈπ¨
πΈ NAME πΈ
kexec_walk_resources β call func(data) on free memory regions π«Ά
β¨ SYNOPSIS β¨
int kexec_walk_resources (struct kexec_buf *kbuf , int (*func)(struct
resource *, void *) );
like, that's the whole vibe. two args, one function pointer, no cap π
π ARGUMENTS π
kbufβ the context info for the search π§ and also likeβ¦ it gets passed tofunctoo, so it's doing double duty, main character energy frfuncβ the function you call for each memory region π every single one, bestie
β RETURN β
so here's the tea β the memory walk stops the moment func returns a non-zero value β and that value is what gets returned to you, periodt β
but if all the free regions get visited and func never returns non-zero? then you get zero back π easy.
π¦ SEE ALSO π¦
- Kernel file
./kernel/kexec_file.cπ kexec_locate_mem_hole(9)kexec_add_buffer(9)
go read those too, iykyk π
lowkey important: if func goes non-zero, the walk is done β no finishing the tour, no "one more region", it's over bestie π
and that's the whole page, mwah π this one lives under ./kernel, dated October 2026, and it's literally kexec_walk_resources(9) β slay, go forth and walk those resources πΈππ
π¦ 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