| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 1 #include <stdio.h> | 5 #include <stdio.h> |
| 2 #include <map> | 6 #include <map> |
| 3 | 7 |
| 4 #include "base/logging.h" | 8 #include "base/logging.h" |
| 5 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 6 | 10 |
| 7 bool inH = true; | 11 bool inH = true; |
| 8 struct H { | 12 struct H { |
| 9 H() { inH = false; tick_ = 0; bw_ = 0; d_bw_ = d_tick_ = 0; m_bw_ = 0; mem_ =
high_ = 0;} | 13 H() { inH = false; tick_ = 0; bw_ = 0; d_bw_ = d_tick_ = 0; m_bw_ = 0; mem_ =
high_ = 0;} |
| 10 ~H() { | 14 ~H() { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 //printf("%u\n", s); | 117 //printf("%u\n", s); |
| 114 void *p = malloc(s); | 118 void *p = malloc(s); |
| 115 _H.add(s, p); | 119 _H.add(s, p); |
| 116 return p; | 120 return p; |
| 117 } | 121 } |
| 118 | 122 |
| 119 void operator delete(void *p) { | 123 void operator delete(void *p) { |
| 120 _H.sub(p); | 124 _H.sub(p); |
| 121 free(p); | 125 free(p); |
| 122 } | 126 } |
| OLD | NEW |