#ifndef KERNEL_HEAP_H #define KERNEL_HEAP_H #include #define KERNEL_HEAP_SIZE_BYTES (1024 * 1024 * 100) /* 100 MiB */ #define KERNEL_HEAP_ENTRIES (KERNEL_HEAP_SIZE_BYTES / PAGE_SIZE) /* Addresses taken from OSDev x86 memory map */ #define KERNEL_HEAP_ADDR (0x01000000) /* This should give us 480.5 kiB, enough for the current table size */ #define KERNEL_HEAP_TBL_ADDR (0x00007E00) void kernel_heap_init(); void * kmalloc(size_t size); void * kzalloc(size_t size); void kfree(void *ptr); #endif /* KERNEL_HEAP_H */