From 94c4889e182d6c0c387241277bd365f36c624196 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 28 May 2020 16:00:17 +0200 Subject: Added page directory freeing function --- src/kernel/memory/paging.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/kernel/memory/paging.c b/src/kernel/memory/paging.c index aea717a..fd5ae3b 100644 --- a/src/kernel/memory/paging.c +++ b/src/kernel/memory/paging.c @@ -81,6 +81,13 @@ u32 **paging_make_directory() return dir; } +void paging_remove_directory(u32 **dir) +{ + // TODO: Fix freeing of directory by calculating aligned offset + free(dir[0]); + free(dir); +} + void paging_disable() { u32 cr0; -- cgit v1.2.3