AUTALLOCHEAP(3)

πŸ“¦ version 5.1.1, in fedora 43, fedora 44

✨ NAME ✨

okay so bestie, meet autallocheap β€” it's a heap memory allocator 🫢 and it lives in the AUT FUNCTIONS part of the manual, which is the (3) in AUTALLOCHEAP(3) πŸ’… that's the whole vibe.


🌍 ORIGIN 🌍

This software belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France. πŸ‡«πŸ‡·βœ¨


πŸ“œ SYNOPSIS πŸ“œ

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

🧚 PARAMETERS 🧚

  • Size β€” the number of memory bytes you want allocated contiguously, like one big uninterrupted lil chunk πŸ“

πŸ’– DESCRIPTION πŸ’–

autallocheap returns a block of Size bytes length, allocated on the heap. 🌸

And the block? set to zero. Clean slate energy, no cap 🧼✨

Also, its use is strongly encouraged when the Size is very small β€” so like, tiny allocations? this is your girl πŸ‘‘πŸ’…


πŸ”₯ RETURN VALUE πŸ”₯

autallocheap returns a pointer to a Size bytes long block. that's it, that's the return, iconic behavior πŸŽ€


πŸ’€ ERRORS πŸ’€

  • "autalloc: alloc error, can't continue !" β€” this one means the system break can't be moved anymore, and no more memory can be retrieved from the system. like, the well is dry, there's nothing left to give 😭 it's giving end of the road.

🌈 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).

go read those too bestie, the whole friend group ate πŸ«ΆπŸ’œ


πŸ› 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, they're literally asking β€” send the feedback, bestie πŸ“¬πŸ’–


and that's a wrap on AUTALLOCHEAP(3), brought to you by ASIM/LIP6 and dated October 1, 1997 β€” yes she's an elder icon and she still serves πŸ’…πŸ‘‘