struct nmb *nmb_new() { struct nmb *nmb = xmalloc(sizeof(*nmb)); nmb->mpool = mempool_new(); nmb->pma = pma_new(64); nmb->count = 0; nmb->memory_used = 0; return nmb; }
struct nmb *nmb_new(struct env *e) { struct nmb *nmb = xmalloc(sizeof(*nmb)); nmb->mpool = mempool_new(); nmb->pma = pma_new(64); nmb->count = 0; nmb->e = e; return nmb; }
struct nmb *nmb_new(struct tree_options *opts) { struct nmb *nmb = xmalloc(sizeof(*nmb)); nmb->mpool = mempool_new(); nmb->pma = pma_new(64); nmb->opts = opts; nmb->count = 0; ness_mutex_init(&nmb->mtx); ness_rwlock_init(&nmb->rwlock, &nmb->mtx); return nmb; }