aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2020-05-28 16:00:17 +0200
committerMarvin Borner2020-05-28 16:00:17 +0200
commit94c4889e182d6c0c387241277bd365f36c624196 (patch)
treefd3c27a7564fbdb9915c9f749156e34f9c7ad7b1
parent0977f984ca61c6cce96705ab923bdf93dc3ce5a3 (diff)
Added page directory freeing function
-rw-r--r--src/kernel/memory/paging.c7
1 files changed, 7 insertions, 0 deletions
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;