ENUM VB2_MEMORY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum vb2_memory(9) β€” like, the actual kernel API manual, bestie

okay so this is a page from the Kernel API Manual and it's all about enum vb2_memory β€” literally just the vibe-check of which memory model is being used to make buffers visible on userspace. that's it. that's the whole thing. but it's important so pay attention πŸŽ€


✨ NAME ✨

enum vb2_memory β€” the type of memory model used to make the buffers visible on userspace. no cap, that's the job. πŸ¦‹


🌸 SYNOPSIS 🌸

here's the whole enum, bestie, exactly as it lives in the source:

enum vb2_memory {
    VB2_MEMORY_UNKNOWN ,
    VB2_MEMORY_MMAP ,
    VB2_MEMORY_USERPTR ,
    VB2_MEMORY_DMABUF

};

πŸ‘‘ Constants πŸ‘‘

okay so these are the four options. four. that's it. slay πŸ’…

  • VB2_MEMORY_UNKNOWN β€” buffer status is unknown, or it's just not being used yet on userspace. it's giving "no thoughts, head empty" 🫧
  • VB2_MEMORY_MMAP β€” the buffers are allocated by the Kernel, and they're memory mapped via mmap ioctl. and listen β€” this model is also the one in play when the user is using the buffers via read or write system calls. so it's a two-for-one situation, iconic ✨
  • VB2_MEMORY_USERPTR β€” the buffers were allocated in userspace, and it's memory mapped via mmap ioctl. (yes, that's what it says. userspace allocation, mmap ioctl mapping. periodt πŸ’–)
  • VB2_MEMORY_DMABUF β€” the buffers are passed to userspace via DMA buffer. that's the whole description. short and mysterious, main character energy πŸ”₯

πŸ’œ SEE ALSO πŸ’œ

okay this list is long and I respect it immensely. here's every single one, no skipping, we don't do that here πŸŽ€

Kernel file ./include/media/videobuf2-core.h:

like. fifty-ish cross-references. obsessed with the dedication honestly 🌈


ngl bestie, that VB2_MEMORY_USERPTR entry reads exactly like the VB2_MEMORY_MMAP one about mmap ioctl β€” I'm just telling you what the page says, don't come for me πŸ™ˆ

and that's the whole page!! mwah πŸ’‹ it lives at ./include/media, and the version/date on this lil beauty is October 2026 β€” so yeah, future vibes only. go forth and buffer correctly, bestie πŸ§šβ€β™€οΈβ­πŸ«Ά

πŸ“¦ where this page comes from