diff options
Diffstat (limited to 'src/kernel/core/region.c')
-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; |