vb2_create_framevec(9)
π 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 π
- Kernel file
./drivers/media/common/videobuf2/videobuf2-memops.c vb2_destroy_framevec(9),vb2_common_vm_open(9),vb2_common_vm_close(9)
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
- 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