dma_alloc_from_contiguous(9)
π dma_alloc_from_contiguous(9) π
okay so bestie, this is a page straight out of the Kernel API Manual β it's literally called dma_alloc_from_contiguous(9) and it's all about grabbing pages from a contiguous area. no cap, it's a good one. π
β¨ NAME β¨
dma_alloc_from_contiguous β allocate pages from contiguous area π¦
πΈ SYNOPSIS πΈ
struct page * dma_alloc_from_contiguous (struct device *dev , size_t
count , unsigned int align , bool no_warn );
like, that's the whole vibe β it hands you back a struct page *, periodt. π
π ARGUMENTS π
devβ pointer to the device you're doing this allocation for, bestie. it's giving "who is this for" energy. πcountβ the requested number of pages. literally how many you want. π₯alignβ the requested alignment of pages, and jsyk it's inPAGE_SIZEorder. β¨no_warnβ avoid printing the message about a failed allocation. like, keep it quiet, no drama pls. π
π¦ DESCRIPTION π¦
so here's the tea β β this function allocates a memory buffer for the specified device. it uses the device specific contiguous memory area if available, or else the default global one. slay. π
it requires the architecture specific dev_get_cma_area helper function β so like, don't come for this function unless your arch has that hookup, iykyk. π
π SEE ALSO π
Kernel file ./kernel/dma/contiguous.c, plus these iconic little friends:
dma_contiguous_get_area_by_idx(9)dma_contiguous_reserve(9)dma_contiguous_reserve_area(9)dma_release_from_contiguous(9)dma_alloc_contiguous(9)dma_free_contiguous(9)
go read them, they ate. π π₯
and that's the page!! mwah π β this one lives in ./kernel/dma, dated October 2026, and it's filed under dma_alloc_from_contiguous(9). byeee bestie, go allocate something cute π«Άπ
π¦ 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