Normalized defaults

This commit is contained in:
mathusummut
2018-12-16 15:06:51 +01:00
parent fb9a48fd02
commit 4769e132d0
39 changed files with 322 additions and 323 deletions

View File

@@ -67,22 +67,22 @@ void AllocRegistry::dump(const char *path) {
leakBytes += info.bytes;
//allocs[i].stack = AllocInfo::getStackTrace();
fprintf(f, "Leak #%d.\tfile: %s, line: %d, ptr [%p], bytes: " MG_SIZE_T_SPECIFIER ", array: %d, inuse: %d\n%s\n", ++leakCount, info.file, info.line, info.ptr, info.bytes, info.array, info.inuse, info.stack.c_str());
fprintf(f, "Leak #%d.\tfile: %s, line: %d, ptr [%p], bytes: " SIZE_T_SPECIFIER ", array: %d, inuse: %d\n%s\n", ++leakCount, info.file, info.line, info.ptr, info.bytes, info.array, info.inuse, info.stack.c_str());
}
}
}
fprintf(f, "\nTotal leaks: %d, " MG_SIZE_T_SPECIFIER " bytes\n", leakCount, leakBytes);
fprintf(f, "Total allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", allocCount, allocBytes);
fprintf(f, "Not monitored allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", nonMonitoredCount, nonMonitoredBytes);
fprintf(f, "\nTotal leaks: %d, " SIZE_T_SPECIFIER " bytes\n", leakCount, leakBytes);
fprintf(f, "Total allocations: %d, " SIZE_T_SPECIFIER " bytes\n", allocCount, allocBytes);
fprintf(f, "Not monitored allocations: %d, " SIZE_T_SPECIFIER " bytes\n", nonMonitoredCount, nonMonitoredBytes);
fclose(f);
}
printf("Memory leak dump summary at: %s\n", szBuf2);
printf("Total leaks: %d, " MG_SIZE_T_SPECIFIER " bytes\n", leakCount, leakBytes);
printf("Total allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", allocCount, allocBytes);
printf("Not monitored allocations: %d, " MG_SIZE_T_SPECIFIER " bytes\n", nonMonitoredCount, nonMonitoredBytes);
printf("Total leaks: %d, " SIZE_T_SPECIFIER " bytes\n", leakCount, leakBytes);
printf("Total allocations: %d, " SIZE_T_SPECIFIER " bytes\n", allocCount, allocBytes);
printf("Not monitored allocations: %d, " SIZE_T_SPECIFIER " bytes\n", nonMonitoredCount, nonMonitoredBytes);
}
#endif