AUTFREEHEAP(3)

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

πŸŽ€ autfreeheap(3) β€” AUT FUNCTIONS πŸŽ€

okay bestie, welcome to the autfreeheap page πŸ’– this one lives in the AUT FUNCTIONS section of the manual, and it's literally the "give the memory back" bestie of autallocheap. short page, big job. let's get into it 🫢


🌸 ORIGIN 🌸

this software belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France πŸ₯–βœ¨ (yes, that Paris).


✨ SYNOPSIS ✨

#include "aut101.h"
void autfreeheap( Pointer, Size )
   char         βˆ—Pointer;
   unsigned int Size;

πŸ¦‹ PARAMETERS πŸ¦‹

  • Pointer β€” the pointer you're handing back to the heap 🫴 she's going home.
  • Size β€” the size of the block that was previously allocated by autallocheap. you gotta tell her how big she was, no cap.

πŸ’… DESCRIPTION πŸ’…

autfreeheap frees a pointer and puts the block back on the heap. that's the whole vibe ✨

and listen β€” using it is necessary to free memory blocks that were previously allocated by autallocheap πŸ‘‘ like, that's the matching pair, the duo, the main characters. autallocheap gives, autfreeheap takes back. periodt πŸ’€


πŸ“ RETURN VALUE πŸ“

autfreeheap returns nothing. literally nothing. void. empty. she gives you zero back and that's iconic 😌


🌈 EXAMPLE 🌈

okay here's the whole thing in action, bestie β€” a little bipointer struct and her alloc/free besties:

#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 ) );
}
πŸ‘€ just copying it faithfully, bestie β€” that last line says exactly what it says, so don't come for me, I'm just the messenger πŸ’€

🧚 SEE ALSO 🧚

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


πŸ’œ 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, tell them what's broken, they want to know.


and that's the page, bestie! 🌸 this one's from ASIM/LIP6, dated October 1, 1997 (yes she's an elder icon πŸ‘‘), filed under AUTFREEHEAP(3). go forth and free your heap responsibly πŸŽ€πŸ’–

πŸ“¦ where this page comes from