diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-11 20:47:04 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-11 20:47:04 +0100 |
commit | 55e9614a6358fb3270405332e94c2eeda057350b (patch) | |
tree | 107d30ee39bef6933c51959b3333d80a0388c575 /src/kernel | |
parent | 50b5427a8edbb8d59215334f5a250e7f8d6d7ca7 (diff) | |
download | kogata-55e9614a6358fb3270405332e94c2eeda057350b.tar.gz kogata-55e9614a6358fb3270405332e94c2eeda057350b.zip |
Include kernel.map in tests.
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/core/region.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |