autallocheap.3alc - Man Page

heap memory allocator

Synopsis

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

Parameters

Size

Number of memory bytes to be contiguously allocated

Description

autallocheap returns a block of Size bytes length, allocated on the heap. The memory block is set to zero. Its use is strongly encouraged when the Size is very small.

Return Value

autallocheap returns a pointer to a Size bytes long block.

Errors

"autalloc: alloc error, can't continue !"

System break can't be moved anymore, no more memory can be retrieved from the system.

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

Referenced By

autallocblock.3alc(3), autfreeblock.3alc(3), autfreeheap.3alc(3), autresizeblock.3alc(3).

October 1, 1997 ASIM/LIP6 AUT FUNCTIONS