diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-08 20:01:55 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-08 20:01:55 +0000 |
commit | 9bc6ce1d3c1a78b8a6997e67cd8bbd3497f081fb (patch) | |
tree | e2f681050222b5197d144f8a58b32cf3d7713f89 | |
parent | b17d5e3aebd27e5e47a9dbd6d4296904bc5cef0a (diff) | |
download | chromium_src-9bc6ce1d3c1a78b8a6997e67cd8bbd3497f081fb.zip chromium_src-9bc6ce1d3c1a78b8a6997e67cd8bbd3497f081fb.tar.gz chromium_src-9bc6ce1d3c1a78b8a6997e67cd8bbd3497f081fb.tar.bz2 |
MemoryDebug uses size_t, which portably comes from <sys/types.h>. Use "base/basictypes.h" to get it, and clean up a couple other things.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@587 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/memory_debug.cc | 6 | ||||
-rw-r--r-- | base/memory_debug.h | 13 |
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_ |