Added files with basic definitions of KPC (kernel process communication).
[kernel.git] / inc / kernelheap.h
blobed2c708318f6c4c0d741985c2b432be9ea866d58
1 // Kernel heap
3 #ifndef __KERNEL__KHEAP___HEADER____
4 #define __KERNEL__KHEAP___HEADER____
6 #include "types.h"
7 #include "ord_array.h"
11 extern const UINT KHEAP_start;
12 extern const UINT KHEAP_size;
13 extern const UINT KHEAP_indexsize;
14 extern const UINT KHEAP_MAGIC;
17 typedef struct
19 UINT magic;
20 UINT8 is_hole;
21 UINT size;
22 } HEAP_header;
24 typedef struct
26 UINT magic;
27 HEAP_header *header;
28 } HEAP_footer;
30 typedef struct
32 OrdArray index;
33 UINT start_address;
34 UINT end_address;
35 UINT8 supervisor;
36 UINT8 readonly;
37 } Heap;
40 extern INT8 create_heap (Heap *, UINT, UINT, UINT8, UINT8);
41 extern void *alloc(UINT, UINT8, Heap*);
42 extern void *kalloc(UINT, UINT8);
43 extern void free(void *, Heap*);
44 extern void kfree(void *);
46 extern Heap KHeap;
48 #endif //(__KERNEL__KHEAP___HEADER____)