goto fail;
}
+ tdb->stats.alloc_coalesce_tried++;
/* Look left */
if (offset - sizeof(tdb1_off_t) > TDB1_DATA_START(tdb->tdb1.header.hash_size)) {
tdb1_off_t left = offset - sizeof(tdb1_off_t);
"tdb1_free: update_tailer failed at %u", offset);
goto fail;
}
+ tdb->stats.alloc_coalesce_succeeded++;
+ tdb->stats.alloc_coalesce_num_merged++;
+ tdb->stats.frees++;
tdb1_unlock(tdb, -1, F_WRLCK);
return 0;
}
}
/* And we're done. */
+ tdb->stats.frees++;
tdb1_unlock(tdb, -1, F_WRLCK);
return 0;
if (tdb1_rec_write(tdb, rec_ptr, rec) == -1) {
return 0;
}
+ tdb->stats.allocs++;
return rec_ptr;
}
return 0;
}
+ tdb->stats.allocs++;
+ tdb->stats.alloc_leftover++;
return rec_ptr;
}