Track malloc size with a header for SHOW_MEMORY

This commit is contained in:
2024-03-14 15:30:46 -07:00
parent ee36bda8f8
commit b817e3c749
4 changed files with 29 additions and 26 deletions

View File

@@ -149,7 +149,7 @@ private:
setMaxVersion(level, v);
}
void destroy() { free(this); }
void destroy() { safe_free(this); }
private:
int getNodeSize() const {
@@ -655,7 +655,7 @@ ConflictSet::ConflictSet(int64_t oldestVersion)
ConflictSet::~ConflictSet() {
if (impl) {
impl->~Impl();
free(impl);
safe_free(impl);
}
}