diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-14 14:17:03 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-14 14:17:03 +0100 |
commit | 4672f514591f0f7110103c4cd898909aef95b635 (patch) | |
tree | 59a7edc5fd7b1c9c567ada4ec74afe1ed30d5d15 /src/common | |
parent | f811e0126639c3cc14c285f2e2093d0df1b556af (diff) | |
download | kogata-4672f514591f0f7110103c4cd898909aef95b635.tar.gz kogata-4672f514591f0f7110103c4cd898909aef95b635.zip |
Fix region allocator (see changes in region.c!) ; debug spam control.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/libkogata/slab_alloc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/common/libkogata/slab_alloc.c b/src/common/libkogata/slab_alloc.c index daa3a50..0736655 100644 --- a/src/common/libkogata/slab_alloc.c +++ b/src/common/libkogata/slab_alloc.c @@ -238,10 +238,7 @@ void slab_free(mem_allocator_t* a, void* addr) { // check the object is not already on the free list (double-free error) for (object_t *i = r->first_free_obj; i != 0; i = i->next) { - if (!((void*)i >= r->region_addr && (void*)i < r->region_addr + region_size)){ - dbg_printf("Invalid object 0x%p in cache 0x%p - %x\n", i, r->region_addr, region_size); - PANIC("Error"); - } + ASSERT((void*)i >= r->region_addr && (void*)i < r->region_addr + region_size); ASSERT(o != i); } |