From 55e9614a6358fb3270405332e94c2eeda057350b Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 11 Mar 2015 20:47:04 +0100 Subject: Include kernel.map in tests. --- src/kernel/core/region.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/kernel/core/region.c') diff --git a/src/kernel/core/region.c b/src/kernel/core/region.c index c4c34d1..886c9fc 100644 --- a/src/kernel/core/region.c +++ b/src/kernel/core/region.c @@ -165,9 +165,12 @@ descriptor_t *find_used_region(void* addr) { void add_used_region(descriptor_t *d) { descriptor_t *i = first_used_region; + ASSERT(i != 0); ASSERT(i->used.i.addr < d->used.i.addr); // first region by address is never free while (i != 0) { + ASSERT(i != d); + ASSERT(i->used.i.addr != d->used.i.addr); ASSERT(i->used.i.addr < d->used.i.addr); if (i->used.next_by_addr == 0 || i->used.next_by_addr->used.i.addr > d->used.i.addr) { d->used.next_by_addr = i->used.next_by_addr; -- cgit v1.2.3