diff options
Diffstat (limited to 'tools/iso/kernel.soso/alloc.h')
-rw-r--r-- | tools/iso/kernel.soso/alloc.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/iso/kernel.soso/alloc.h b/tools/iso/kernel.soso/alloc.h new file mode 100644 index 00000000..e4985aa5 --- /dev/null +++ b/tools/iso/kernel.soso/alloc.h @@ -0,0 +1,24 @@ +#ifndef ALLOC_H +#define ALLOC_H + +#include "common.h" +#include "process.h" + +void initializeKernelHeap(); +void *ksbrkPage(int n); +void *kmalloc(uint32 size); +void kfree(void *v_addr); + +void initializeProcessHeap(Process* process); +void *sbrk(Process* process, int nBytes); + +uint32 getKernelHeapUsed(); + +struct MallocHeader { + unsigned long size:31; + unsigned long used:1; +} __attribute__ ((packed)); + +typedef struct MallocHeader MallocHeader; + +#endif // ALLOC_H |