Initialize version sooner in VersionedMap::begin

This commit is contained in:
2024-05-16 18:45:26 -07:00
parent 1e1f5d6d5c
commit 190cd05c13
4 changed files with 38 additions and 33 deletions

View File

@@ -123,6 +123,11 @@ struct RootSet::Impl {
firstToFree = firstToFree->next;
safe_free(tmp, ThreadSafeHandle::Impl::sizeForCapacity(tmp->capacity));
}
#ifndef NDEBUG
assert(rootCount() > 0);
auto *h = handle.load(std::memory_order_relaxed);
assert(h->versions()[h->lastLeq(oldestVersion)] <= oldestVersion);
#endif
}
const uint32_t *roots() const {