gen_pool_dma_alloc_algo(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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. Use NULL if 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:


Source/version: ./lib Β· Date: October 2026 Β· Page: gen_pool_dma_alloc_algo(9) β€” bye bestie, stay iconic πŸ’…βœ¨

πŸ“¦ where this page comes from