memblock_setclr_flag(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

memblock_setclr_flag β€” the one where you set or clear a flag for a memory region, bestie ✨

So this is a page from the Kernel API Manual (section 9, kernel dev docs, iykyk) and it's literally just about flipping one little flag on one little slice of memory. Small function, big main character energy πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

int __init_memblock memblock_setclr_flag (struct memblock_type *type ,
phys_addr_t base , phys_addr_t size , int set , int flag );

That's the whole vibe. Five args, one int back. Slay.


🌸 ARGUMENTS 🌸

  • type β€” the memblock type you're setting/clearing the flag for 🫢
  • base β€” base address of the region, like where the slice starts
  • size β€” size of the region, aka how far it goes
  • set β€” set or clear the flag (yes it's literally the switch, no cap)
  • flag β€” the actual flag to update πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: this function isolates the region [base, base + size), and then it sets/clears flag on it. That's it. That's the whole function. It's giving precision. It's giving laser focus. πŸ’…

fr fr the brackets matter β€” [base, base + size) is the exact region, don't @ me.

✨ RETURN ✨

  • 0 on success β€” we love a clean win 🌈
  • -errno on failure β€” 😭 but at least it tells you why

πŸ‘‘ SEE ALSO πŸ‘‘

The whole memblock cinematic universe, bestie β€” go read these too, they're iconic:


and that's the page, bestie πŸ’œ this lil gem lives in the ./mm corner of the tree, shipped under the Kernel API Manual, dated October 2026 β€” go forth and flag responsibly πŸ§šβ€β™€οΈβ­

πŸ“¦ where this page comes from