diff options
author | Freya Murphy <freya@freyacat.org> | 2025-05-01 21:34:22 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-05-01 21:34:22 -0400 |
commit | f7a899db24b91005e57bf4d3b5494e59965c7f04 (patch) | |
tree | 45f6a7f1b0e162f7d5f433b453ab17efd857f195 /kernel/lib/kalloc.c | |
parent | ramdisk (diff) | |
download | comus-f7a899db24b91005e57bf4d3b5494e59965c7f04.tar.gz comus-f7a899db24b91005e57bf4d3b5494e59965c7f04.tar.bz2 comus-f7a899db24b91005e57bf4d3b5494e59965c7f04.zip |
changes idk
Diffstat (limited to 'kernel/lib/kalloc.c')
-rw-r--r-- | kernel/lib/kalloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/lib/kalloc.c b/kernel/lib/kalloc.c index 02e9457..8dca46b 100644 --- a/kernel/lib/kalloc.c +++ b/kernel/lib/kalloc.c @@ -1,3 +1,4 @@ +#include "lib/kio.h" #include <lib.h> #include <comus/memory.h> @@ -34,7 +35,8 @@ static struct page_header *get_header(void *ptr) static void *alloc_new(size_t size) { - size_t pages = ((size + header_len + PAGE_SIZE - 1) / PAGE_SIZE) * PAGE_SIZE; + size_t pages = + ((size + header_len + PAGE_SIZE - 1) / PAGE_SIZE) * PAGE_SIZE; void *addr = kalloc_pages(pages); void *mem = (char *)addr + header_len; |