From 03cc6fc2b52e97790ec7685020e533d909424614 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 14 Mar 2015 17:20:17 +0100 Subject: Adjustments in region allocation code (fix first_bigger ??) --- src/tests/ktests/region1/test.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/tests/ktests/region1') 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(); -- cgit v1.2.3