本文整理汇总了C++中AddressList::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ AddressList::reset方法的具体用法?C++ AddressList::reset怎么用?C++ AddressList::reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AddressList
的用法示例。
在下文中一共展示了AddressList::reset方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onTxAbort
/*** 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;
}
示例2: onTxCommit
/*** 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;
}
示例3: onTxAbort
/*** 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;
}