| 225 | } |
| 226 | |
| 227 | void PrintLocationCounters() |
| 228 | { |
| 229 | #ifdef TRACK_LOCATIONS |
| 230 | // Print allocation counts per location |
| 231 | map<loc, counters>::iterator i2 = locCount.begin(); |
| 232 | while (i2 != locCount.end()) |
| 233 | { |
| 234 | const char *file = i2->first.file; |
| 235 | int line = i2->first.line; |
| 236 | int count = i2->second.allocs; |
| 237 | int frees = i2->second.frees; |
| 238 | int totalMem = i2->second.totalMemAlloced; |
| 239 | int totalFree = i2->second.totalMemFreed; |
| 240 | PRINTF("%s (%d): %d, %d, %d, %d\n", file, line, count, count-frees, totalMem, totalMem - totalFree); |
| 241 | i2++; |
| 242 | } |
| 243 | #endif |
| 244 | } |
| 245 | |
| 246 | void RemoveMemoryManager() |
| 247 | { |
no test coverage detected