memblock_mark_mirror(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… memblock_mark_mirror(9)

okay so bestie, welcome to the Kernel API Manual β€” this one's memblock_mark_mirror(9) and it's honestly a little legend. it does exactly one thing and it does it slayfully: tags a chunk of your physical memory with the MEMBLOCK_MIRROR flag. that's it. that's the whole vibe. πŸͺžβœ¨


✨ SYNOPSIS ✨

int __init_memblock memblock_mark_mirror (phys_addr_t base , phys_addr_t size );

like, look at that signature. __init_memblock, two phys_addr_ts, returns an int. clean. minimal. main character energy fr fr. πŸŽ€


🌸 ARGUMENTS 🌸

  • base β€” the base phys addr of the region πŸ‘‘ (yes, the physical address, not some virtual nonsense, keep up bestie)
  • size β€” the size of the region πŸ“ (how big the vibe is, basically)

πŸ’– RETURN πŸ’–

  • 0 on success πŸ₯³
  • -errno on failure 😭 (so like, negative errno value, not "minus errno" as a concept β€” standard kernel sadness protocol)

πŸ¦‹ SEE ALSO πŸ¦‹

so there's a whole friend group here and you should lowkey meet all of them. first up, the source itself lives in the kernel file ./mm/memblock.c, and there's a memblock overview(9) that's basically the group chat pinned message:

ngl that's a lot of besties but they're all iconic in their own way, go say hi πŸ’œ


ok genuine reminder before you go: this page is filed under ./mm, dated October 2026, and its title is memblock_mark_mirror(9) β€” screenshot it, cite it, whatever, just don't lose the receipts 🫢 slay and stay marked πŸŒˆβ­πŸ’…
πŸ“¦ where this page comes from