diff options
Diffstat (limited to 'src/tests/ktests/region1')
-rw-r--r-- | src/tests/ktests/region1/test.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/tests/ktests/region1/test.c b/src/tests/ktests/region1/test.c index 58b4933..b5367d9 100644 --- a/src/tests/ktests/region1/test.c +++ b/src/tests/ktests/region1/test.c @@ -5,24 +5,39 @@ void test_region_1() { void* p = region_alloc(0x1000, "Test region"); dbg_printf("Allocated one-page region: 0x%p\n", p); dbg_print_region_info(); + void* q = region_alloc(0x1000, "Test region"); dbg_printf("Allocated one-page region: 0x%p\n", q); dbg_print_region_info(); + void* r = region_alloc(0x2000, "Test region"); dbg_printf("Allocated two-page region: 0x%p\n", r); dbg_print_region_info(); + void* s = region_alloc(0x10000, "Test region"); dbg_printf("Allocated 16-page region: 0x%p\n", s); dbg_print_region_info(); + region_free(p); dbg_printf("Freed region 0x%p\n", p); dbg_print_region_info(); + + region_free(r); + dbg_printf("Freed region 0x%p\n", r); + dbg_print_region_info(); + + p = region_alloc(0x1000, "Test region"); + dbg_printf("Allocated one-page region: 0x%p\n", p); + dbg_print_region_info(); + region_free(q); dbg_printf("Freed region 0x%p\n", q); dbg_print_region_info(); - region_free(r); - dbg_printf("Freed region 0x%p\n", r); + + region_free(p); + dbg_printf("Freed region 0x%p\n", p); dbg_print_region_info(); + region_free(s); dbg_printf("Freed region 0x%p\n", s); dbg_print_region_info(); |