1AUTALLOCHEAP(3) AUT FUNCTIONS AUTALLOCHEAP(3)
2
3
4
6 autallocheap - heap memory allocator
7
9 #include "aut101.h"
10 char *autallocheap( Size )
11 unsigned int Size;
12
14 Size Number of memory bytes to be contiguously allocated
15
17 autallocheap returns a block of Size bytes length, allocated on the
18 heap. The memory block is set to zero. Its use is strongly encouraged
19 when the Size is very small.
20
22 autallocheap returns a pointer to a Size bytes long block.
23
25 "autalloc: alloc error, can't continue !"
26 System break can't be moved anymore, no more memory can be
27 retrieved from the system.
28
30 #include "aut101.h"
31 typedef struct bipointer
32 {
33 struct bipointer ∗NEXT;
34 void ∗DATA;
35 } bipointer;
36 bipointer ∗addbipointer( Data );
37 void ∗Data;
38 {
39 bipointer ∗Bp = (bipointer ∗)autallocheap( sizeof( bipointer ) );
40 Bp->DATA = Data; return Bp;
41 }
42
44 aut(1), autresizeblock(3), autallocblock(3), autfreeblock(3), autfree‐
45 heap(3).
46
47
48
49
50
51
52ASIM/LIP6 October 1, 1997 AUTALLOCHEAP(3)