summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/memory_debug.cc6
-rw-r--r--base/memory_debug.h13
2 files changed, 12 insertions, 7 deletions
diff --git a/base/memory_debug.cc b/base/memory_debug.cc
index 6acfe83..e6cdc9b 100644
--- a/base/memory_debug.cc
+++ b/base/memory_debug.cc
@@ -27,6 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include "base/memory_debug.h"
+
#ifdef PURIFY
// this #define is used to prevent people from directly using pure.h
// instead of memory_debug.h
@@ -34,8 +36,6 @@
#include "base/third_party/purify/pure.h"
#endif
-#include "base/memory_debug.h"
-
namespace base {
bool MemoryDebug::memory_in_use_ = false;
@@ -76,4 +76,4 @@ void MemoryDebug::MarkAsInitialized(void* addr, size_t size) {
#endif
}
-} // namespace base
+} // namespace base
diff --git a/base/memory_debug.h b/base/memory_debug.h
index c1283dc..acac831 100644
--- a/base/memory_debug.h
+++ b/base/memory_debug.h
@@ -32,11 +32,14 @@
// a supported memory tool (currently, only Purify)
#ifndef BASE_MEMORY_DEBUG_H_
+#define BASE_MEMORY_DEBUG_H_
+
+#include "base/basictypes.h"
namespace base {
class MemoryDebug {
-public:
+ public:
// Since MIU messages are a lot of data, and we don't always want this data,
// we have a global switch. If disabled, *MemoryInUse are no-ops.
static void SetMemoryInUseEnabled(bool enabled);
@@ -57,10 +60,12 @@ public:
// or UMCs.
static void MarkAsInitialized(void* addr, size_t size);
-private:
+ private:
static bool memory_in_use_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryDebug);
};
-} // namespace base
+} // namespace base
-#endif \ No newline at end of file
+#endif // BASE_MEMORY_DEBUG_H_