memblock_mark_nomap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

memblock_mark_nomap β€” okay so this is the one that marks a memory region with the flag MEMBLOCK_NOMAP, and it's lowkey iconic for it ✨

(also hi bestie, this page lives in the Kernel API Manual section 9, so if anyone asks, that's the whole vibe πŸ’–)


πŸ¦‹ SYNOPSIS πŸ¦‹

int __init_memblock memblock_mark_nomap (phys_addr_t base , phys_addr_t
size );

🌸 ARGUMENTS 🌸

  • base β€” the base phys addr of the region, like the starting coordinate of the whole situation πŸŽ€
  • size β€” the size of the region. yes queen, just how big it is πŸ’…

✨ DESCRIPTION ✨

So the memory regions marked with MEMBLOCK_NOMAP will not be added to the direct mapping of the physical memory β€” they're literally not invited to that party πŸ™ˆ

But here's the thing: these regions will still be covered by the memory map. The memory map said "you still live here", just not in the direct mapping. no cap.

And the struct page representing NOMAP memory frames in the memory map will be PageReserved β€” that's the whole personality of those frames now πŸ‘‘


πŸ‘‘ NOTE πŸ‘‘

if the memory being marked MEMBLOCK_NOMAP was allocated from memblock, the caller must inform kmemleak to ignore that memory. like, must must. this is not a drill πŸ’€

πŸ’– RETURN πŸ’–

0 on success, -errno on failure. that's it, that's the whole return arc 😭


🌈 SEE ALSO 🌈

so many siblings, it's giving family reunion 🫢 and yes, all of them:


okay that's the whole page bestie, ily, go mark some memory πŸ’œ

this iconic lil doc came from ./mm, October 2026 edition β€” talk soon, mwah πŸŽ€πŸ’–

πŸ“¦ where this page comes from