/*** On abort, unroll allocs, clear lists, exit epoch */ void onTxAbort() { AddressList::iterator i, e; for (i = allocs.begin(), e = allocs.end(); i != e; ++i) { free(*i); } frees.reset(); allocs.reset(); *my_ts = 1+*my_ts; }
/*** On commit, perform frees, clear lists, exit epoch */ void onTxCommit() { AddressList::iterator i, e; for (i = frees.begin(), e = frees.end(); i != e; ++i) { schedForReclaim(*i); } frees.reset(); allocs.reset(); *my_ts = 1+*my_ts; }
/*** On abort, unroll allocs, clear lists, exit epoch */ void onTxAbort() { return; // printf("on tx abort\n"); AddressList::iterator i, e; /* if (allocs.size() > 0){ printf("WARNING: Aborted a transaction that allocated" "elements. Sitevm wont' free those elements (but support for" "this is coming soon!).\n"); } */ /* //This is already done as part of sitevm now. for (i = allocs.begin(), e = allocs.end(); i != e; ++i) sitefree(*i); */ frees.reset(); allocs.reset(); *my_ts = 1+*my_ts; }