1 /* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
2 
3 #ifndef Heap__h
4 #define Heap__h
5 
6 #include "SYSTEM.h"
7 
8 typedef
9 	struct Heap_CmdDesc *Heap_Cmd;
10 
11 typedef
12 	CHAR Heap_CmdName[24];
13 
14 typedef
15 	void (*Heap_Command)(void);
16 
17 typedef
18 	struct Heap_CmdDesc {
19 		Heap_Cmd next;
20 		Heap_CmdName name;
21 		Heap_Command cmd;
22 	} Heap_CmdDesc;
23 
24 typedef
25 	void (*Heap_EnumProc)(void(*)(SYSTEM_PTR));
26 
27 typedef
28 	void (*Heap_Finalizer)(SYSTEM_PTR);
29 
30 typedef
31 	struct Heap_ModuleDesc *Heap_Module;
32 
33 typedef
34 	CHAR Heap_ModuleName[20];
35 
36 typedef
37 	struct Heap_ModuleDesc {
38 		Heap_Module next;
39 		Heap_ModuleName name;
40 		INT32 refcnt;
41 		Heap_Cmd cmds;
42 		INT64 types;
43 		Heap_EnumProc enumPtrs;
44 		char _prvt0[8];
45 	} Heap_ModuleDesc;
46 
47 
48 import SYSTEM_PTR Heap_modules;
49 import INT64 Heap_allocated;
50 import INT64 Heap_heap;
51 import INT64 Heap_heapsize, Heap_heapMinExpand;
52 import INT16 Heap_FileCount;
53 
54 import ADDRESS *Heap_ModuleDesc__typ;
55 import ADDRESS *Heap_CmdDesc__typ;
56 
57 import void Heap_FINALL (void);
58 import INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len);
59 import void Heap_GC (BOOLEAN markStack);
60 import void Heap_INCREF (Heap_Module m);
61 import void Heap_InitHeap (void);
62 import void Heap_Lock (void);
63 import SYSTEM_PTR Heap_NEWBLK (INT64 size);
64 import SYSTEM_PTR Heap_NEWREC (INT64 tag);
65 import void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd);
66 import SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs);
67 import void Heap_REGTYP (Heap_Module m, INT64 typ);
68 import void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize);
69 import void Heap_Unlock (void);
70 import void *Heap__init(void);
71 
72 
73 #endif // Heap
74