1 // Copyright (c) 2006-2008 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.
5 #include "base/memory_debug.h"
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"
16 bool MemoryDebug::memory_in_use_
= false;
18 void MemoryDebug::SetMemoryInUseEnabled(bool enabled
) {
19 memory_in_use_
= enabled
;
22 void MemoryDebug::DumpAllMemoryInUse() {
29 void MemoryDebug::DumpNewMemoryInUse() {
36 void MemoryDebug::DumpAllLeaks() {
42 void MemoryDebug::DumpNewLeaks() {
48 void MemoryDebug::MarkAsInitialized(void* addr
, size_t size
) {
50 PurifyMarkAsInitialized(addr
, size
);