mm: implement heap with liballoc, might review later
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#ifndef KERNEL_HEAP_H
|
||||
#define KERNEL_HEAP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define KHEAP_START 0xE0000000 // Start of kernel heap
|
||||
#define KHEAP_INITIAL_SIZE 0x100000 // 1 MiB initial size
|
||||
#define KHEAP_END (KHEAP_START + KHEAP_INITIAL_SIZE)
|
||||
#define KHEAP_PAGES (KHEAP_INITIAL_SIZE / PAGE_SIZE)
|
||||
|
||||
void kheap_init();
|
||||
void* kvalloc(size_t npages);
|
||||
void kvfree(void* addr, size_t npages);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user