//suite int main(void) { arena = Arena_new(); store = OeBdb_new(1, "data", true); assert(store); testTxnCommitPut(); testBogusTxnPut(); testCommitTake(); testCommitRMW(); testRollback(); for (int i = 0; i < 100; i++) { testCommitRMW(); } testDetectDeadlock(); OeStore_stats(store); int close_ret = OeStore_free(&store); assert(close_ret == 0); //test_update_of_expired_txn(); //test_commit_of_expired_txn(); Arena_free(arena); Arena_dispose(&arena); return 0; }
void _process_fun(user_callback *fun, void *funarg) { TRY fun(funarg); Arena_free(Oed_get_arena()); //reset/free this thread's arena between tasks EXCEPT(Arena_Failed) _handle_mem_error(); EXCEPT(Mem_Failed) _handle_mem_error(); END_TRY; }
void Arena_dispose(T *ap) { assert(ap && *ap); Arena_free(*ap); free(*ap); *ap = NULL; }