diff options
Diffstat (limited to 'kernel/mem.h')
-rw-r--r-- | kernel/mem.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/mem.h b/kernel/mem.h index f779997..e8e6a4f 100644 --- a/kernel/mem.h +++ b/kernel/mem.h @@ -1,7 +1,12 @@ #pragma once #include <stddef.h> +#define PAGE_SIZE 4096 + void mem_init(); -void *malloc(size_t size); -void free(void *ptr); +// allocates `pages` consecutive pages +void *page_alloc(size_t pages); + +// frees `pages` consecutive pages starting from *first +void page_free(void *first, size_t pages); |