assert(end <= btrp->area_end);
if (end == btrp->area_end) {
- PARA_DEBUG_LOG("end of pool area reached: %p\n", end);
+ PARA_DEBUG_LOG("%s: end of pool area reached\n", btrp->name);
end = btrp->area_start;
}
if (end == btrp->rhead) {
/*
* Allocate a new btr buffer.
*
- * The freshly allocated buffer will have a zero refcount.
+ * The freshly allocated buffer will have a zero refcount and will
+ * not be associated with a btr pool.
*/
static struct btr_buffer *new_btrb(char *buf, size_t size)
{
/* make a new btrb that combines the two buffers and a br to it. */
sz = szs[0] + szs[1];
buf = para_malloc(sz);
- PARA_DEBUG_LOG("memory merging input buffers: (%zu, %zu) -> %zu\n",
- szs[0], szs[1], sz);
+ PARA_DEBUG_LOG("%s: memory merging input buffers: (%zu, %zu) -> %zu\n",
+ btrn->name, szs[0], szs[1], sz);
memcpy(buf, bufs[0], szs[0]);
memcpy(buf + szs[0], bufs[1], szs[1]);