diff options
Diffstat (limited to 'src/kernel/memory/paging.c')
-rw-r--r-- | src/kernel/memory/paging.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/kernel/memory/paging.c b/src/kernel/memory/paging.c index 96fa584..917a186 100644 --- a/src/kernel/memory/paging.c +++ b/src/kernel/memory/paging.c @@ -48,12 +48,14 @@ void paging_install() info("Malloc test succeeded!"); } -u32 *paging_make_directory(int user) +u32 **paging_make_directory(int user) { - u32 *dir = valloc(1024 * 1024 * 32); - u32 *tables = valloc(1024 * 1024 * 32); + u32 **dir = valloc(1024 * 32); + dir[0] = valloc(1024 * 1024 * 32); + for (int i = 1; i < 1024; i++) + dir[i] = dir[0] + i * 1024; - paging_init(dir, tables, user); + paging_init(dir, user); return dir; } |