memblock_phys_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… memblock_phys_free(9) β€” Kernel API Manual, bestie edition ✨

okay so this is a page from the Kernel API Manual, and honestly? it's a little baddie with one job and it does it. it hands boot memory back to the system, and it does it flawlessly. let's get into it 🫢


🌸 NAME 🌸

memblock_phys_free β€” free boot memory block

like, the whole personality is right there in the name. free. boot memory block. iconic, no notes πŸ’–


✨ SYNOPSIS ✨

int __init_memblock memblock_phys_free (phys_addr_t base , phys_addr_t size );

look at that signature. int return, __init_memblock annotation, two phys_addr_t args. it's giving "small function, big responsibilities" and we stan 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • base β€” the phys starting address of the boot memory block. like, where does this block even begin, bestie. this is the answer πŸ“
  • size β€” size of the boot memory block in bytes. yep, plain old bytes, no fancy units, no vibes-based measurement. just bytes 🌈

πŸ’« DESCRIPTION πŸ’«

so here's the tea: this frees a boot memory block that was previously allocated by the memblock_phys_alloc_xx API. allocated it before? we're un-allocating it now. balance restored, karma clean ✨

and the detail you actually need to remember: if called after the buddy allocator is available, the memory is released to the buddy allocator. like, the buddy allocator is up and running, so the memory doesn't just vanish β€” it goes home to buddy. it's a whole handoff situation 🀝


πŸ¦‹ SEE ALSO πŸ¦‹

okay, this list is long, but every single one of these is a real one, so let's go. no skipping, we don't do that here πŸ’…

that's the whole friend group. say hi to all of them or don't, but they're all in the group chat πŸ‘‘


quick vibe check before you go: every name above is exactly as written, so if you're grepping for one, you've got the spelling right here. no autocorrect behavior in this house πŸ™ˆ

and that's the page, bestie!! 🌈 this one ships out of the ./mm source directory, version vibes dated October 2026 β€” so mark your calendar, screenshot this, send it to the group chat, and go free some boot memory πŸ’–πŸŽ€πŸ¦‹βœ¨πŸ‘‘

πŸ“¦ where this page comes from