VENTI-MEM(3)

πŸ“¦ version 0_git20260208, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

πŸ’– 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 πŸ‘€

venti(3)

mwah πŸ’… β€” signed off from the footer as VENTI-MEM(3), source /src/libventi; no separate version or date is printed on this page, bestie πŸŽ€