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

@@ -2819,6 +2819,7 @@ void removeKey(Node *n) {
struct __attribute__((visibility("default"))) PeakPrinter {
~PeakPrinter() {
printf("malloc bytes: %g\n", double(mallocBytes));
printf("Peak malloc bytes: %g\n", double(peakMallocBytes));
printf("Node bytes: %g\n", double(nodeBytes));
printf("Peak node bytes: %g\n", double(peakNodeBytes));