qlibs:(alloc)
πΈ qlibs:(alloc) πΈ
hey bestie, welcome to the qlibs:(alloc) manual β this is the page for alloc, and we're gonna get you comfy with it π
β¨ NAME β¨
allocβ allocate memory π§ β¨
π SYNTAX π
okay so here's the exact shape of it, no cap:
#include "alloc.h"
char *alloc(new);
void alloc_free(x);
void alloc_re(&x,old,new);
char *x;
unsigned int old;
unsigned int new;
π« DESCRIPTION π«
alloc allocates enough space from the heap for new bytes of data, and it's adequately aligned for any data type. new may be 0. alloc returns a pointer to that space. If space is not available, alloc returns 0 and sets errno appropriately. slay. β¨
alloc_free returns space to the heap. bye space π
alloc_re expands the space allocated to x from old bytes to new bytes. It allocates new space, copies old bytes from the old space to the new space, returns the old space to the heap, and changes x to point to the new space. Then it returns 1. If space is not available, alloc_re returns 0, leaving the old space alone. periodt. π
π‘οΈ CVE-2005-1513 π‘οΈ
bestie, important: this version ofallocrespectslimits.hto avoid memory resource exhaustion. that's the whole note, but it matters π
π SEE ALSO π
byeee π«Ά β source/version qlibs:(alloc), page 3 (that's the footer, no date in the original, bestie) πβ¨
π¦ where this page comes from
- alpine 3.24: fehqlibs-doc 31-r0 Β· Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms