diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-14 17:20:17 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-14 17:20:17 +0100 |
commit | 03cc6fc2b52e97790ec7685020e533d909424614 (patch) | |
tree | db4f43722b36f7f6bce5db4f64b0359d25cc1905 /src/tests/ktests/region1 | |
parent | 3e2a3170501fb02b5b46a342c47d2ba8b1a6e244 (diff) | |
download | kogata-03cc6fc2b52e97790ec7685020e533d909424614.tar.gz kogata-03cc6fc2b52e97790ec7685020e533d909424614.zip |
Adjustments in region allocation code (fix first_bigger ??)
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(); |