memblock_mark_kho_scratch(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… memblock_mark_kho_scratch β€” a kernel API manual, but make it cute

okay so bestie, welcome to the memblock_mark_kho_scratch(9) page πŸ’– this is a kernel API manual and it's lowkey iconic, so let's get into it ✨


✨ NAME ✨

memblock_mark_kho_scratch β€” mark a memory region as MEMBLOCK_KHO_SCRATCH πŸŽ€

like, that's the whole vibe. you're tagging a region. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

int memblock_mark_kho_scratch (phys_addr_t base , phys_addr_t size );

there she is. two args, one int coming back at you. no cap. πŸ’«


🌸 ARGUMENTS 🌸

  • base β€” the base phys addr of the region. yes bestie, the physical address, not the vibe address 🫢
  • size β€” the size of the region. how big it is. the whole point πŸ“

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the actual tea β˜•: only memory regions that are marked with MEMBLOCK_KHO_SCRATCH will be considered for allocations during early boot with kexec handover. that's it. that's the rule. if you didn't mark it, it's not getting considered β€” no cap, fr fr 😭

so like, this function is the one doing the marking. it's giving gatekeeper energy and honestly? it ate πŸ’…


⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • -errno on failure πŸ’€

that's the whole return contract, bestie. zero means we slayed, negative errno means we did not. periodt.


🌈 SEE ALSO 🌈

buckle up, this is a long list and we're getting through all of it πŸ§šβ€β™€οΈ starting with the home base:

iykyk, that's the whole memblock friend group and they're all linked 🫢


πŸ’€ real talk though: this page lives in ./mm and the whole set here is kernel-internal territory β€” go read the neighbour pages before you go poking at regions, okay bestie? πŸ™ˆ

and that's the page!! 🌟 sign-off time: this one comes to you from the source tree at ./mm, dated October 2026 β€” take care of her, she's iconic πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from