dma_alloc_from_contiguous(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 in PAGE_SIZE order. ✨
  • 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:

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