MDB_db *me_dbs[2];
MDB_oldpages *me_pghead;
pthread_key_t me_txkey; /* thread-key for readers */
+ pgno_t me_free_pgs[MDB_IDL_UM_SIZE];
};
#define NODESIZE offsetof(MDB_node, mn_data)
pthread_mutex_lock(&env->me_txns->mt_wmutex);
env->me_txns->mt_txnid++;
- txn->mt_free_pgs = malloc(MDB_IDL_UM_SIZEOF);
- if (txn->mt_free_pgs == NULL) {
- free(txn->mt_u.dirty_queue);
- free(txn);
- return ENOMEM;
- }
+ txn->mt_free_pgs = env->me_free_pgs;
txn->mt_free_pgs[0] = 0;
}
STAILQ_REMOVE_HEAD(txn->mt_u.dirty_queue, h.md_next);
free(dp);
}
- free(txn->mt_free_pgs);
free(txn->mt_u.dirty_queue);
while ((mop = txn->mt_env->me_pghead)) {
}
pthread_mutex_unlock(&env->me_txns->mt_wmutex);
- free(txn->mt_free_pgs);
free(txn->mt_u.dirty_queue);
free(txn);
txn = NULL;