aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-14 14:17:03 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-14 14:17:03 +0100
commit4672f514591f0f7110103c4cd898909aef95b635 (patch)
tree59a7edc5fd7b1c9c567ada4ec74afe1ed30d5d15 /src/common
parentf811e0126639c3cc14c285f2e2093d0df1b556af (diff)
downloadkogata-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.c5
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);
}