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

@@ -102,7 +102,7 @@ ConflictSet::ConflictSet(int64_t oldestVersion)
ConflictSet::~ConflictSet() {
if (impl) {
impl->~Impl();
free(impl);
safe_free(impl);
}
}
@@ -142,6 +142,6 @@ ConflictSet_create(int64_t oldestVersion) {
__attribute__((__visibility__("default"))) void ConflictSet_destroy(void *cs) {
using Impl = ConflictSet::Impl;
((Impl *)cs)->~Impl();
free(cs);
safe_free(cs);
}
}