summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/pagedir.c
diff options
context:
space:
mode:
authordzwdz2022-08-19 18:03:59 +0200
committerdzwdz2022-08-19 18:03:59 +0200
commit7a4bc281958c639cd52ff4f192933aa161ba81a4 (patch)
tree6afc254b32bc724d872227f4fb3699ef03f511a0 /src/kernel/arch/amd64/pagedir.c
parente9161cdcda9e5170f3ea5f18a8275395004ffce4 (diff)
kernel: kzalloc
Diffstat (limited to 'src/kernel/arch/amd64/pagedir.c')
-rw-r--r--src/kernel/arch/amd64/pagedir.c4
1 files changed, 1 insertions, 3 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) {