vb2_create_framevec(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vb2_create_framevec(9)

okay bestie, welcome to the Kernel API Manual page for vb2_create_framevec(9) β€” the function whose whole job is to map virtual addresses to pfns. we love a memory-mapping moment. ✨


πŸŽ€ NAME πŸŽ€

vb2_create_framevec β€” map virtual addresses to pfns. periodt.

✨ SYNOPSIS ✨

struct frame_vector * vb2_create_framevec (unsigned long start ,
       unsigned long length , bool write );

🌸 ARGUMENTS 🌸

  • start β€” the virtual user address where we start mapping. that's our starting point, bestie.
  • length β€” the length of a range to map. how big the range is, basically.
  • write β€” should we map for writing into the area? yes, this is the write-vibe bool.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the tea β˜•: this function allocates and fills in a vector with pfns corresponding to the virtual address range passed in arguments. no cap.

if those pfns have corresponding pages, page references are also grabbed to pin pages in memory. that's the whole pinning situation, and it's lowkey important. πŸ“Œ

the function returns a pointer to the vector on success and an error pointer in case of failure. so: success = pointer, failure = error pointer. got it? 🫢

bestie moment: the returned vector needs to be freed via vb2_destroy_pfnvec. like, don't leave it sitting there, that's not the vibe. πŸ’…

πŸ’œ SEE ALSO πŸ’œ


xoxo, your kernel bestie πŸ’– β€” this page is from source/version ./drivers/media/common/videobuf2, dated October 2026, title vb2_create_framevec(9). bye bestie! πŸ‘‘

πŸ“¦ where this page comes from