1AUTFREEHEAP(3) AUT FUNCTIONS AUTFREEHEAP(3)
2
3
4
6 autfreeheap - releases a memory block, and put it on the heap.
7
9 #include "aut101.h"
10 void autfreeheap( Pointer, Size )
11 char ∗Pointer;
12 unsigned int Size;
13
15 Pointer Pointer to be given back to the heap.
16
17 Size Size of the block previously allocated by autal‐
18 locheap.
19
21 autfreeheap frees a pointer and puts the block back to the heap. Its
22 use is necessary to free memory blocks, previously allocated by autal‐
23 locheap.
24
26 autfreeheap returns nothing.
27
29 #include "aut101.h"
30 typedef struct bipointer
31 {
32 struct bipointer ∗NEXT;
33 void ∗DATA;
34 } bipointer;
35 bipointer ∗addbipointer( Data );
36 void ∗Data;
37 {
38 bipointer ∗Bp = (bipointer ∗)autallocheap( sizeof( bipointer ) );
39 Bp->DATA = Data;
40 return Bp;
41 }
42 void delbipointer( Bp );
43 bipointer ∗Bp;
44 {
45 autfreeheap( Pointer, sizeof( bipointer ) );
46 }
47
49 aut(1), autresizeblock(3), autallocheap(3), autallocblock(3), autfree‐
50 block(3).
51
52
53
54
55
56
57ASIM/LIP6 October 1, 1997 AUTFREEHEAP(3)