STRUCT DMA_HEAP_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 a struct dma_buf ptr ✨ 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