STRUCT DMA_HEAP_OPS(9)
β¨ struct dma_heap_ops β the kernel API manual β¨
okay so bestie, gather round π this is the page for struct dma_heap_ops, from the Kernel API Manual, and it's genuinely not scary, i promise. it's literally just one function pointer and a vibe check π«Ά
πΈ NAME πΈ
struct dma_heap_ops β the ops you use to operate on a given heap β¨
π SYNOPSIS π
here's the whole struct, exactly as written, no cap:
struct dma_heap_ops {
struct dma_buf *(*allocate)(struct dma_heap *heap, unsigned long
len, u32 fd_flags, u64 heap_flags);
};
likeβ¦ that's it. that's the whole thing. one member. main character energy honestly π
π¦ Members π¦
allocateβ this is the one that allocates a dmabuf and hands you back astruct dma_bufptr β¨ slay
π Description π
so when you call allocate, it returns a dmabuf on success π and on error it gives you ERR_PTR(-errno) instead β so like, check it, don't just assume it's fine, bestie π that's the whole contract. that's the tea.
π SEE ALSO π
- the kernel file
./include/linux/dma-heap.hβ go read it, iykyk π§ struct dma_heap_export_info(9)β its bestie page π«Ά
and that's the page, fr fr π it lives in ./include/linux and this version is dated October 2026, from struct dma_heap_ops(9) in the Kernel API Manual β periodt, go forth and allocate responsibly πΈβ¨π
π¦ 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