dma_pool_alloc(9)
π dma_pool_alloc β get a block of coherent memory π
okay bestie, welcome to the Kernel API Manual entry for dma_pool_alloc(9) β yes that's the manual name, it's giving very serious kernel energy, and we're gonna make it make sense π
β¨ SYNOPSIS β¨
void * dma_pool_alloc (struct dma_pool *pool , gfp_t mem_flags ,
dma_addr_t *handle );
literally three args, one return, zero drama. slay π
πΈ ARGUMENTS πΈ
poolβ the dma pool that will produce the block. it's the main character here, the one actually handing out the memory π«Άmem_flagsβ aGFP_*bitmask. yes, the flags go here, no cap π«handleβ a pointer to the dma address of the block. this is where the dma address gets reported back to you π¦
β RETURN β
so what do you get? the kernel virtual address of a currently unused block β and it reports that block's dma address through the handle. iconic behaviour honestly π
but bestie, listen: if such a memory block can't be allocated,NULLis returned. that's the vibe check. always check forNULL, fr fr π
π¦ SEE ALSO π¦
- the kernel file
./mm/dmapool.cπ dma_pool_create_node(9)dma_pool_destroy(9)dma_pool_free(9)dmam_pool_create(9)dmam_pool_destroy(9)
go read those too, iykyk π
and that's the whole page, bestie β sourced from ./mm, dated October 2026, filed under dma_pool_alloc(9) in the Kernel API Manual. periodt. πβ¨
π¦ 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