STRUCT DMA_HEAP_ALLOCATION_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct dma_heap_allocation_data β€” it's the metadata your userspace hands over when it wants an allocation πŸŽ€

Manual: Kernel API Manual, bestie. Yes we're in the kernel docs now, put your seatbelt on πŸ’…


🌸 SYNOPSIS 🌸

struct dma_heap_allocation_data {
    __u64 len;
    __u32 fd;
    __u32 fd_flags;
    __u64 heap_flags;
 };

That's literally the whole struct. Four little fields. Iconic behavior, no notes 🫢


🧩 Members 🧩

  • len β€” the size of the allocation. That's how much you're asking for, bestie, so be honest about it πŸ“
  • fd β€” this bad boy will be populated with a fd, and that fd gives you the handle to the allocated dma-buf. It's giving "I'll fill it in for you, don't worry about it" ✨
  • fd_flags β€” the file descriptor flags used when allocating 🌸
  • heap_flags β€” the flags that get passed to the heap. Yeah. They go to the heap. That's the vibe πŸ’œ

πŸ‘‘ DESCRIPTION πŸ‘‘

So the deal is: this struct is provided by userspace as an argument to the ioctl πŸ¦‹

That's it. That's the description. Userspace hands it over, the ioctl takes it, everybody moves on with their day. Main character energy for a metadata struct, honestly 😭


🌈 SEE ALSO 🌈

  • Kernel file ./include/uapi/linux/dma-heap.h β€” the source of truth, iykyk πŸ“
  • DMABUF Heaps Userspace API(9) β€” the whole userspace side of the story 🧚
  • DMA_HEAP_IOCTL_ALLOC - allocate memory from pool(9) β€” the ioctl that actually takes this struct, the one we were just talking about πŸ”₯

ngl bestie, this page is short and sweet β€” but every field still matters, so don't skip any of them πŸ’–

okay that's the whole thing, periodt πŸ’… this lil masterpiece lives in ./include/uapi/linux and the docs are dated October 2026 β€” catch you in the group chat, love u, bye 🫢✨🌈

πŸ“¦ where this page comes from