aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute/postinglist/postinglist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/tests/attribute/postinglist/postinglist.cpp')
-rw-r--r--searchlib/src/tests/attribute/postinglist/postinglist.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/searchlib/src/tests/attribute/postinglist/postinglist.cpp b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
index 54efb3261c8..e41aaec351e 100644
--- a/searchlib/src/tests/attribute/postinglist/postinglist.cpp
+++ b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
@@ -259,12 +259,12 @@ AttributePostingListTest::freeTree(bool verbose)
static_cast<uint64_t>(_intNodeAlloc->getMemoryUsage().allocatedBytesOnHold()));
_intNodeAlloc->freeze();
_intPostings->freeze();
- _intNodeAlloc->transferHoldLists(_handler.getCurrentGeneration());
+ _intNodeAlloc->assign_generation(_handler.getCurrentGeneration());
_intPostings->clearBuilder();
- _intPostings->transferHoldLists(_handler.getCurrentGeneration());
+ _intPostings->assign_generation(_handler.getCurrentGeneration());
_handler.incGeneration();
- _intNodeAlloc->trimHoldLists(_handler.getFirstUsedGeneration());
- _intPostings->trimHoldLists(_handler.getFirstUsedGeneration());
+ _intNodeAlloc->reclaim_memory(_handler.get_oldest_used_generation());
+ _intPostings->reclaim_memory(_handler.get_oldest_used_generation());
LOG(info,
"freeTree after unhold: %" PRIu64 " (%" PRIu64 " held)",
static_cast<uint64_t>(_intNodeAlloc->getMemoryUsage().allocatedBytes()),
@@ -613,9 +613,9 @@ AttributePostingListTest::doCompactEnumStore(Tree &tree,
valueHandle.holdBuffer(*it);
}
generation_t generation = _handler.getCurrentGeneration();
- valueHandle.transferHoldLists(generation);
+ valueHandle.assign_generation(generation);
_handler.incGeneration();
- valueHandle.trimHoldLists(_handler.getFirstUsedGeneration());
+ valueHandle.reclaim_memory(_handler.get_oldest_used_generation());
LOG(info,
"doCompactEnumStore done");
@@ -658,8 +658,8 @@ bumpGeneration(Tree &tree,
(void) tree;
(void) valueHandle;
postingsAlloc.freeze();
- postingsAlloc.transferHoldLists(_handler.getCurrentGeneration());
- postings.transferHoldLists(_handler.getCurrentGeneration());
+ postingsAlloc.assign_generation(_handler.getCurrentGeneration());
+ postings.assign_generation(_handler.getCurrentGeneration());
_handler.incGeneration();
}
@@ -672,8 +672,8 @@ removeOldGenerations(Tree &tree,
{
(void) tree;
(void) valueHandle;
- postingsAlloc.trimHoldLists(_handler.getFirstUsedGeneration());
- postings.trimHoldLists(_handler.getFirstUsedGeneration());
+ postingsAlloc.reclaim_memory(_handler.get_oldest_used_generation());
+ postings.reclaim_memory(_handler.get_oldest_used_generation());
}
int
@@ -689,7 +689,7 @@ AttributePostingListTest::Main()
lookupRandomValues(*_intTree, *_intNodeAlloc, *_intKeyStore, *_intPostings,
_stlTree, _randomValues);
_intNodeAlloc->freeze();
- _intNodeAlloc->transferHoldLists(_handler.getCurrentGeneration());
+ _intNodeAlloc->assign_generation(_handler.getCurrentGeneration());
doCompactEnumStore(*_intTree, *_intNodeAlloc, *_intKeyStore);
removeRandomValues(*_intTree, *_intNodeAlloc, *_intKeyStore, *_intPostings,
_stlTree, _randomValues);