autfreeheap(3)

autfreeheap3

Releases a memory block, and put it on the heap.

Synopsys

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

Parameters

Pointer

Pointer to be given back to the heap.

Size

Size of the block previously allocated by autallocheap.

Overview

autfreeheap frees a pointer and puts the block back to the heap. Its use is necessary to free memory blocks, previously allocated by autallocheap.

Return value

autfreeheap returns nothing.

Examples

#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 ) );
}

Releases

Unchanged in 4 releases since Debian 7 (Wheezy).

  1. 7–10

From alliance 5.1.1-3 in Debian 10 (Buster). Parsed by carta from the page's man source.