iovec(3type)

πŸ’– iovec β€” the 3type page, but make it a vibe

okay so bestie, welcome to iovec(3type) πŸ’… this is a type, not a function, not a syscall, just a lil data structure that the kernel girlies use to gossip about memory ✨ strap in.


πŸŽ€ NAME πŸŽ€

iovec β€” Vector I/O data structure πŸ¦‹

like. it's a vector. of I/O. the name ate and left no crumbs.


πŸ“š LIBRARY πŸ“š

Standard C library (libc) πŸ’œ


✨ SYNOPSIS ✨

#include <sys/uio.h>

struct iovec {
    void   *iov_base;  /* Starting address */
    size_t  iov_len;   /* Size of the memory pointed to by iov_base. */
};

LOOK AT HER. two fields. that's it. that's the whole girl. main character energy fr fr πŸ‘‘


🌸 DESCRIPTION 🌸

So basically, an iovec describes a region of memory β€” it kicks off at the iov_base address and it's iov_len bytes long. that's the whole deal, no cap 🫢

But here's where it gets iconic: system calls don't just use one of these β€” they use arrays of them. each element in the array is its own memory region, and the entire array together is a whole vector of memory regions πŸŒˆπŸ’«

and the maximum number of iovec structures you can fit in that array? limited by IOV_MAX bestie, which is defined in <limits.h>, or you can grab it by calling sysconf(_SC_IOV_MAX) πŸ’…

lowkey important: hit that limit and things get spicy, so know your IOV_MAX iykyk πŸ’€

πŸ“ STANDARDS πŸ“

POSIX.1-2024. periodt πŸ’–


πŸ•°οΈ HISTORY πŸ•°οΈ

  • SUSv1
  • POSIX.1-2001 XSI

the way she's been around since SUSv1 and still serves looks?? generational 😭✨


πŸ“ NOTES πŸ“

plot twist bestie: this type is also provided by another header β€”

  • <sys/socket.h>

so if you see it there, no you didn't hallucinate πŸ™ˆ she gets around πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

go read those next, bestie, they're the ones actually doing stuff with her πŸ¦‹


and that's the whole page!! 🌸 this was the Linux man-pages 6.20 version, dated 2026-01-09 β€” so you know it's fresh, no cap πŸ’– mwah, go forth and vector your I/O πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms