if (size == 0)
return;
- //PARA_CRIT_LOG("filled: %zu, alloc %zu\n", btr_pool_filled(btrp), size);
assert(size <= btr_pool_available(btrp));
end = btrp->whead + size;
assert(end <= btrp->area_end);
end = btrp->area_start;
}
if (end == btrp->rhead) {
- PARA_DEBUG_LOG("btrp buffer full\n");
+ PARA_DEBUG_LOG("%s btrp buffer full\n", btrp->name);
end = NULL; /* buffer full */
}
btrp->whead = end;
- //PARA_CRIT_LOG("filled: %zu\n", btr_pool_filled(btrp));
}
static void btr_pool_deallocate(struct btr_pool *btrp, size_t size)
{
char *end = btrp->rhead + size;
- //PARA_CRIT_LOG("filled: %zu, dealloc %zu\n", btr_pool_filled(btrp), size);
if (size == 0)
return;
assert(end <= btrp->area_end);
btrp->rhead = end;
if (btrp->rhead == btrp->whead)
btrp->rhead = btrp->whead = btrp->area_start;
- //PARA_CRIT_LOG("filled: %zu\n", btr_pool_filled(btrp));
}
#define FOR_EACH_CHILD(_tn, _btrn) list_for_each_entry((_tn), \
{
struct btr_buffer *btrb = br->btrb;
- //PARA_CRIT_LOG("dropping buffer reference %p\n", br);
list_del(&br->node);
free(br);
btrb->refcount--;
}
if (!br->btrb->pool)
break;
- if (result + rv != buf) {
- PARA_DEBUG_LOG("%s: pool merge impossible: %p != %p\n",
- btrn->name, result + rv, buf);
+ if (result + rv != buf)
break;
- }
-// PARA_CRIT_LOG("%s: inplace merge (%zu, %zu)->%zu\n", btrn->name,
-// rv, sz, rv + sz);
-// PARA_CRIT_LOG("%s: inplace merge %p (%zu)\n", btrn->name,
-// result, sz);
rv += sz;
}
if (bufp)
br = get_first_input_br(btrn);
assert(br);
- //PARA_CRIT_LOG("wrap count: %zu\n", br->wrap_count);
if (br->wrap_count == 0) {
/*
* No wrap buffer. Drop buffer references whose buffer