Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

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

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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | base/memory/memory_debug.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 // Functions used to debug memory usage, leaks, and other memory issues.
6 // All methods are effectively no-ops unless this program is being run through
7 // a supported memory tool (currently, only Purify)
8
9 #ifndef BASE_MEMORY_MEMORY_DEBUG_H_
10 #define BASE_MEMORY_MEMORY_DEBUG_H_
11 #pragma once
12
13 #include "base/base_export.h"
14 #include "base/basictypes.h"
15
16 namespace base {
17
18 class BASE_EXPORT MemoryDebug {
19 public:
20 // Since MIU messages are a lot of data, and we don't always want this data,
21 // we have a global switch. If disabled, *MemoryInUse are no-ops.
22 static void SetMemoryInUseEnabled(bool enabled);
23
24 // Dump information about all memory in use.
25 static void DumpAllMemoryInUse();
26 // Dump information about new memory in use since the last
27 // call to DumpAllMemoryInUse() or DumpNewMemoryInUse().
28 static void DumpNewMemoryInUse();
29
30 // Dump information about all current memory leaks.
31 static void DumpAllLeaks();
32 // Dump information about new memory leaks since the last
33 // call to DumpAllLeaks() or DumpNewLeaks()
34 static void DumpNewLeaks();
35
36 // Mark |size| bytes of memory as initialized, so it doesn't produce any UMRs
37 // or UMCs.
38 static void MarkAsInitialized(void* addr, size_t size);
39
40 private:
41 static bool memory_in_use_;
42
43 DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryDebug);
44 };
45
46 } // namespace base
47
48 #endif // BASE_MEMORY_MEMORY_DEBUG_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/memory/memory_debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698