From cb338df9e21bd54aa949cc9c2739b04a4ef12e8b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 19 May 2020 23:07:38 +0200 Subject: Improved test case --- src/kernel/memory/paging.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/kernel/memory/paging.c') diff --git a/src/kernel/memory/paging.c b/src/kernel/memory/paging.c index 94b777e..c00de9a 100644 --- a/src/kernel/memory/paging.c +++ b/src/kernel/memory/paging.c @@ -37,12 +37,14 @@ void paging_install() log("Installed paging"); // Test! - u32 a = (u32)malloc(4096); - u32 b = (u32)malloc(4096); + u32 *a = malloc(4096); + u32 *b = malloc(4096); free((void *)b); free((void *)a); - u32 c = (u32)malloc(2048); - assert(a == c); + u32 *c = malloc(2048); + assert(&a == &c); + c[42] = 4242; + free(c); info("Malloc test succeeded!"); } -- cgit v1.2.3