Chromium Code Reviews

Side by Side Diff: base/memory/memory_debug.cc

Issue 7528010: Remove Purify and Quantify (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « base/memory/memory_debug.h ('k') | base/memory/singleton_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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
5 #include "base/memory/memory_debug.h"
6
7 #ifdef PURIFY
8 // this #define is used to prevent people from directly using pure.h
9 // instead of memory_debug.h
10 #define PURIFY_PRIVATE_INCLUDE
11 #include "base/third_party/purify/pure.h"
12 #endif
13
14 namespace base {
15
16 bool MemoryDebug::memory_in_use_ = false;
17
18 void MemoryDebug::SetMemoryInUseEnabled(bool enabled) {
19 memory_in_use_ = enabled;
20 }
21
22 void MemoryDebug::DumpAllMemoryInUse() {
23 #ifdef PURIFY
24 if (memory_in_use_)
25 PurifyAllInuse();
26 #endif
27 }
28
29 void MemoryDebug::DumpNewMemoryInUse() {
30 #ifdef PURIFY
31 if (memory_in_use_)
32 PurifyNewInuse();
33 #endif
34 }
35
36 void MemoryDebug::DumpAllLeaks() {
37 #ifdef PURIFY
38 PurifyAllLeaks();
39 #endif
40 }
41
42 void MemoryDebug::DumpNewLeaks() {
43 #ifdef PURIFY
44 PurifyNewLeaks();
45 #endif
46 }
47
48 void MemoryDebug::MarkAsInitialized(void* addr, size_t size) {
49 #ifdef PURIFY
50 PurifyMarkAsInitialized(addr, size);
51 #endif
52 }
53
54 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/memory_debug.h ('k') | base/memory/singleton_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine