dma_contiguous_reserve(9)
π 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 pass0it 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 (
memblockorbootmem) 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:
dma_contiguous_get_area_by_idx(9)dma_contiguous_reserve_area(9)dma_alloc_from_contiguous(9)dma_release_from_contiguous(9)dma_alloc_contiguous(9)dma_free_contiguous(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms