blob: 4527a1149e65ddcca66e9ff2ab363a72871831f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef KERNEL_HEAP_H
#define KERNEL_HEAP_H
#include <mm/heap.h>
#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 kfree(void *ptr);
#endif /* KERNEL_HEAP_H */
|