AUTALLOCHEAP(3)

πŸ“¦ version 5.1.1-unstable-2025-02, in nixos 26.05, nixpkgs unstable

okay bestie, buckle up πŸ’… you're reading the autallocheap(3) page β€” it lives in the AUT FUNCTIONS section of the manual, and it's honestly kind of a little legend. let's get into it 🫢


🌸 NAME 🌸

autallocheap β€” heap memory allocator


✨ ORIGIN ✨

so this software belongs to the ALLIANCE CAD SYSTEM, which was developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France. Paris!! the math girlies ate πŸ‡«πŸ‡·πŸ₯


πŸŽ€ SYNOPSIS πŸŽ€

#include "aut101.h"
char *autallocheap( Size )
   unsigned int Size;

πŸ¦‹ PARAMETERS πŸ¦‹

  • Size β€” the number of memory bytes you want allocated contiguously, i.e. all in one cute little row next to each other πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

autallocheap returns a block of Size bytes in length, allocated on the heap. and here's the slay part: the memory block is set to zero ✨ no mysterious garbage, no cursed leftovers, just clean zeros.

its use is strongly encouraged when the Size is very small β€” like, tiny-Size is literally its whole moment, its main character era πŸ‘‘


🌈 RETURN VALUE 🌈

autallocheap returns a pointer to a Size bytes long block. that's it, that's the return 🫢


πŸ’€ ERRORS πŸ’€

  • "autalloc: alloc error, can't continue !" β€” this happens when the system break can't be moved anymore, so no more memory can be retrieved from the system. ngl that's a whole mood killer 😭

πŸ“ EXAMPLE πŸ“

#include "aut101.h"
typedef struct bipointer
{
  struct bipointer βˆ—NEXT;
  void             βˆ—DATA;
} bipointer;
bipointer βˆ—addbipointer( Data );
  void βˆ—Data;
{
  bipointer βˆ—Bp = (bipointer βˆ—)autallocheap( sizeof( bipointer ) );
  Bp->DATA = Data; return Bp;
}

πŸ”₯ SEE ALSO πŸ”₯

aut(1), autresizeblock(3), autallocblock(3), autfreeblock(3), autfreeheap(3).

iykyk, go read the whole family πŸ’…


πŸ‘‘ BUG REPORT πŸ‘‘

this tool is under development at the ASIM department of the LIP6 laboratory. we need your feedback to improve documentation and tools β€” fr fr, your feedback matters, don't leave them on read πŸ™ˆ


mwah that's the page, bestie β€” this one came from ASIM/LIP6 and it's dated October 1, 1997, so it's giving vintage icon energy 🌸✨

πŸ“¦ where this page comes from