AUTFREEHEAP(3)

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

✨ AUTFREEHEAP ✨

okay so bestie, welcome to the AUT FUNCTIONS corner of the manual β€” this one's autfreeheap(3), and it's literally the lil cleanup queen of the aut family πŸŽ€


πŸ’– NAME πŸ’–

autfreeheap β€” releases a memory block, and put it on the heap.

(yeah the grammar is giving "written in 1997" but we love her anyway 🫢)


🌸 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"
void autfreeheap( Pointer, Size )
   char         βˆ—Pointer;
   unsigned int Size;

πŸŽ€ PARAMETERS πŸŽ€

  • Pointer β€” Pointer to be given back to the heap. yes bestie, we're returning her to the wild πŸ’…
  • Size β€” Size of the block previously allocated by autallocheap.

🌈 DESCRIPTION 🌈

autfreeheap frees a pointer and puts the block back to the heap. no cap, that's the whole job.

Its use is necessary to free memory blocks, previously allocated by autallocheap. so if you allocated with autallocheap, you free with autfreeheap β€” they're a matched set, like besties fr fr πŸ‘―β€β™€οΈ


⭐ RETURN VALUE ⭐

autfreeheap returns nothing. literally nothing. silence. the void. πŸ’€ it does the thing and dips.


🧚 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;
}
void delbipointer( Bp );
  bipointer βˆ—Bp;
{
  autfreeheap( Pointer, sizeof( bipointer ) );
}

look at that lil struct doing its main character thing, allocating with autallocheap and then handing it back with autfreeheap πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

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

iykyk β€” go read the whole squad 🫢


πŸ’œ BUG REPORT πŸ’œ

This tool is under development at the ASIM department of the LIP6 laboratory.

We need your feedback to improve documentation and tools. so like, tell them if something's weird, they're genuinely asking πŸ™ˆ


lowkey a whole vibe that this page has been out here since October 1, 1997 and we're still hyping it up. periodt.

ASIM/LIP6 Β· October 1, 1997 Β· AUTFREEHEAP(3) β€” slay, bye bestie πŸ’…βœ¨πŸŽ€