dma_contiguous_reserve(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dma_contiguous_reserve(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this one's a dma_contiguous_reserve(9) moment and it's lowkey iconic. it's a function, it reserves stuff, and it has main character energy in the boot path. let's get into it ✨


🌸 NAME 🌸

dma_contiguous_reserve β€” reserve area(s) for contiguous memory handling 🫢

like, plural on the "area(s)" bestie, we're not playing around.


πŸŽ€ SYNOPSIS πŸŽ€

void dma_contiguous_reserve (phys_addr_t limit );

no return value, no drama. it's void. it just does the thing πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • limit β€” the end address of the reserved memory. it's optional, and if you pass 0 it literally means "any" β€” she's flexible like that πŸ’–

🌈 DESCRIPTION 🌈

so what does she actually do? this function reserves memory from the early allocator. periodt.

it should be called by arch specific code β€” so like, your architecture's own setup β€” and the timing is everything ngl. it has to happen:

  • once the early allocator (memblock or bootmem) has been activated, and
  • after all other subsystems have already allocated/reserved memory
⭐ vibe check: it's an early thing. if you show up late to this party, it's not giving what it's supposed to give. read the two bullet points again before you call her, bestie 😭

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file itself is over at ./kernel/dma/contiguous.c β€” that's the home base 🏠 and here's the whole friend group:


and that's the page!! πŸŽ€ source is ./kernel/dma, dated October 2026 β€” so she's fresh, she's cunty, she's documented. go reserve some contiguous memory bestie, you got this πŸ’œβœ¨πŸ”₯

πŸ“¦ where this page comes from