OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include <algorithm> |
5 #include <windows.h> | 6 #include <windows.h> |
6 #include <tlhelp32.h> // for CreateToolhelp32Snapshot() | 7 #include <tlhelp32.h> // for CreateToolhelp32Snapshot() |
7 #include <map> | 8 #include <map> |
8 | 9 |
9 #include "tools/memory_watcher/memory_watcher.h" | 10 #include "tools/memory_watcher/memory_watcher.h" |
10 #include "base/file_util.h" | 11 #include "base/file_util.h" |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/metrics/stats_counters.h" | 13 #include "base/metrics/stats_counters.h" |
13 #include "base/string_util.h" | 14 #include "base/string_util.h" |
14 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 CallStack* stack = stack_track->stack; | 246 CallStack* stack = stack_track->stack; |
246 PrivateAllocatorString output; | 247 PrivateAllocatorString output; |
247 stack->ToString(&output); | 248 stack->ToString(&output); |
248 fprintf(file_, "%s", output.c_str()); | 249 fprintf(file_, "%s", output.c_str()); |
249 } | 250 } |
250 fprintf(file_, "Total Leaks: %d\n", total_blocks); | 251 fprintf(file_, "Total Leaks: %d\n", total_blocks); |
251 fprintf(file_, "Total Stacks: %d\n", stack_tracks.size()); | 252 fprintf(file_, "Total Stacks: %d\n", stack_tracks.size()); |
252 fprintf(file_, "Total Bytes: %d\n", total_bytes); | 253 fprintf(file_, "Total Bytes: %d\n", total_bytes); |
253 CloseLogFile(); | 254 CloseLogFile(); |
254 } | 255 } |
OLD | NEW |