- attempt to bugfix windows using proper printf syntax for data types

This commit is contained in:
Mark Vejvoda
2012-11-10 06:37:23 +00:00
parent a43ebdb69e
commit ff58a868b3
28 changed files with 178 additions and 157 deletions

View File

@@ -54,21 +54,21 @@ 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: %zu, 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: " 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, "\nTotal leaks: %d, %zu bytes\n", leakCount, leakBytes);
fprintf(f, "Total allocations: %d, %zu bytes\n", allocCount, allocBytes);
fprintf(f, "Not monitored allocations: %d, %zu bytes\n", nonMonitoredCount, nonMonitoredBytes);
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);
fclose(f);
printf("Memory leak dump summary at: %s\n",szBuf2);
printf("Total leaks: %d, %zu bytes\n", leakCount, leakBytes);
printf("Total allocations: %d, %zu bytes\n", allocCount, allocBytes);
printf("Not monitored allocations: %d, %zu bytes\n", nonMonitoredCount, nonMonitoredBytes);
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);
}
#endif