diff options
Diffstat (limited to 'src/kernel/arch')
-rw-r--r-- | src/kernel/arch/amd64/pagedir.c | 4 | ||||
-rw-r--r-- | src/kernel/arch/generic.h | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/kernel/arch/amd64/pagedir.c b/src/kernel/arch/amd64/pagedir.c index 75c9746..f0e45d5 100644 --- a/src/kernel/arch/amd64/pagedir.c +++ b/src/kernel/arch/amd64/pagedir.c @@ -31,9 +31,7 @@ static __user void *addr_canonize(const __user void *addr) { struct pagedir *pagedir_new(void) { - struct pagedir *dir = page_alloc(1); - memset(dir, 0, sizeof *dir); - return dir; + return page_zalloc(1); } void pagedir_free(struct pagedir *dir) { diff --git a/src/kernel/arch/generic.h b/src/kernel/arch/generic.h index b213962..0cf4d50 100644 --- a/src/kernel/arch/generic.h +++ b/src/kernel/arch/generic.h @@ -1,11 +1,9 @@ #pragma once - #include <camellia/types.h> #include <kernel/arch/amd64/registers.h> #include <stdarg.h> #include <stdbool.h> #include <stddef.h> - struct process; // i have no idea where else to put it |