From dbeee1a7e9ff406ce68464c4b0639ebd6f1ada64 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 6 Jan 2014 16:27:59 +0000 Subject: [PATCH] Core: Fixed MemoryProfile issue with USEMALLOC git-svn-id: svn://ultimatepp.org/upp/trunk@6725 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Defs.h | 12 +----------- uppsrc/Core/Log.cpp | 2 ++ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/uppsrc/Core/Defs.h b/uppsrc/Core/Defs.h index 72e0f54b6..4f510f960 100644 --- a/uppsrc/Core/Defs.h +++ b/uppsrc/Core/Defs.h @@ -536,17 +536,7 @@ inline void MemoryIgnoreLeaksBegin() {} inline void MemoryIgnoreLeaksEnd() {} struct MemoryProfile { - int allocated[1024]; - int fragmented[1024]; - int freepages; - int large_count; - int large_size[4096]; - int large_total; - int large_free_count; - int large_free_size[4096]; - int large_free_total; - - MemoryProfile() { memset(this, 0, sizeof(MemoryProfile)); } + int empty__; }; inline MemoryProfile *PeakMemoryProfile() { return NULL; } diff --git a/uppsrc/Core/Log.cpp b/uppsrc/Core/Log.cpp index 175453965..46382f742 100644 --- a/uppsrc/Core/Log.cpp +++ b/uppsrc/Core/Log.cpp @@ -287,6 +287,7 @@ void LogStream::_Put(const void *data, dword size) String AsString(const MemoryProfile& mem) { String text; +#ifdef UPP_HEAP int acount = 0; size_t asize = 0; int fcount = 0; @@ -313,6 +314,7 @@ String AsString(const MemoryProfile& mem) << ", total size " << 64 * mem.large_empty << " KB\n"; text << "Big block count " << mem.big_count << ", total size " << int(mem.big_size >> 10) << " KB\n"; +#endif return text; }