Improve SHOW_MEMORY accounting

This commit is contained in:
2024-05-28 16:54:46 -07:00
parent dc587e627b
commit 0de303b6c6
3 changed files with 22 additions and 8 deletions

View File

@@ -1354,12 +1354,10 @@ VersionedMap::Impl *cast(const VersionedMap &m) {
struct __attribute__((visibility("default"))) PeakPrinter {
~PeakPrinter() {
printf("--- versioned_map ---\n");
printf("malloc bytes: %g\n", double(mallocBytes));
printf("Peak malloc bytes: %g\n", double(peakMallocBytes));
printf("mmap bytes: %g\n", double(mmapBytes));
printf("Peak mmap bytes: %g\n", double(peakMmapBytes));
}
} peakPrinter;
} peakPrinter2;
#endif
} // namespace weaselab