VENTI-MEM(3)
π VENTI-MEM(3): the bestie manual π
okay so this is VENTI-MEM(3) from the Library Functions Manual, and it's literally about error-checking memory allocators π«Ά no cap.
πΈ NAME πΈ
vtbrk, vtmalloc, vtmallocz, vtrealloc, vtstrdup, vtfree β error-checking memory allocators π
β¨ SYNOPSIS β¨
#include <u.h>
#include <libc.h>
#include <venti.h>
void* vtbrk(int size)
void* vtmalloc(int size)
void* vtmallocz(int size)
void* vtrealloc(void *ptr, int size)
char* vtstrdup(char *s)
void vtfree(void *ptr)
π¦ DESCRIPTION π¦
okay so these routines allocate and free memory. on failure, they print an error message and call sysfatal(3). they do not return β like, do not return, periodt ππ
vtbrk returns a pointer to a new, permanently allocated block of at least size bytes β¨.
vtmalloc, vtrealloc, and vtstrdup are like malloc, realloc, and strdup, but β as noted above β do not return on error. vtmallocz is like vtmalloc but zeros the block before returning it. memory allocated with all four should be freed with vtfree when no longer needed π.
π¦ SOURCE π¦
/src/libventi
π SEE ALSO π
mwah π
β signed off from the footer as VENTI-MEM(3), source /src/libventi; no separate version or date is printed on this page, bestie π
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms