diff options
author | Marvin Borner | 2020-05-19 23:07:38 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-19 23:07:38 +0200 |
commit | cb338df9e21bd54aa949cc9c2739b04a4ef12e8b (patch) | |
tree | 638b3dd9f8e88444de87b1c2c635f0ee6238b55d /src/kernel/memory/paging.c | |
parent | 159188a6c7853656884b7670f735776c2f293028 (diff) |
Improved test case
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 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!"); } |