gen_pool_dma_alloc_algo(9)
Okay bestie, this is the manual page for gen_pool_dma_alloc_algo(9) from the Kernel API Manual. Itβs giving βspecial pool memory, but make it DMA,β and honestly? Iconic. π
β¨ NAME β¨
gen_pool_dma_alloc_algo β allocate special memory from the pool for DMA usage with the given pool algorithm. Periodt. π
πΈ SYNOPSIS πΈ
void * gen_pool_dma_alloc_algo (struct gen_pool *pool , size_t size ,
dma_addr_t *dma , genpool_algo_t algo , void *data );
π ARGUMENTS π
poolβ the pool to allocate from. π«Άsizeβ number of bytes to allocate from the pool.dmaβ DMA-view physical address return value. UseNULLif unneeded.algoβ algorithm passed from caller.dataβ data passed to algorithm.
π¦ DESCRIPTION π¦
Okay so the actual job: allocate the requested number of bytes from the specified pool. β¨ It uses the given pool allocation function. Simple, clean, lowkey slay.
π¨ But bestie, can not be used in NMI handler on architectures without an NMI-safe cmpxchg implementation. Thatβs a hard no, not a vibe. π
β RETURN β
The return value is the virtual address of the allocated memory, or NULL on failure. Thatβs the whole tea. π«Ά
π SEE ALSO π
Kernel file: ./lib/genalloc.c
The whole genpool friend group, fr fr:
gen_pool_create(9)gen_pool_add_owner(9)gen_pool_virt_to_phys(9)gen_pool_destroy(9)gen_pool_alloc_algo_owner(9)gen_pool_dma_alloc(9)gen_pool_dma_alloc_align(9)gen_pool_dma_zalloc(9)gen_pool_dma_zalloc_algo(9)gen_pool_dma_zalloc_align(9)gen_pool_free_owner(9)gen_pool_for_each_chunk(9)gen_pool_has_addr(9)gen_pool_avail(9)gen_pool_size(9)gen_pool_set_algo(9)gen_pool_first_fit(9)gen_pool_first_fit_align(9)gen_pool_fixed_alloc(9)gen_pool_first_fit_order_align(9)gen_pool_best_fit(9)gen_pool_get(9)devm_gen_pool_create(9)of_gen_pool_get(9)
Source/version: ./lib Β· Date: October 2026 Β· Page: gen_pool_dma_alloc_algo(9) β bye bestie, stay iconic π
β¨
π¦ 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