summaryrefslogtreecommitdiffstats
path: root/common/dlmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/dlmalloc.c')
-rw-r--r--common/dlmalloc.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 2276532da7..ae5702dd52 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -222,7 +222,6 @@
-
/* Preliminaries */
#ifndef __STD_C
@@ -935,10 +934,10 @@ struct mallinfo mALLINFo();
#endif
/* ---------- To make a malloc.h, end cutting here ------------ */
-#else /* Moved to malloc.h */
+#endif /* 0 */ /* Moved to malloc.h */
#include <malloc.h>
-#if 0
+#ifdef DEBUG
#if __STD_C
static void malloc_update_mallinfo (void);
void malloc_stats (void);
@@ -946,9 +945,7 @@ void malloc_stats (void);
static void malloc_update_mallinfo ();
void malloc_stats();
#endif
-#endif /* 0 */
-
-#endif /* 0 */ /* Moved to malloc.h */
+#endif /* DEBUG */
DECLARE_GLOBAL_DATA_PTR;
@@ -1618,9 +1615,9 @@ static struct mallinfo current_mallinfo = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
/* Tracking mmaps */
-#if 0
+#ifdef DEBUG
static unsigned int n_mmaps = 0;
-#endif /* 0 */
+#endif /* DEBUG */
static unsigned long mmapped_mem = 0;
#if HAVE_MMAP
static unsigned int max_n_mmaps = 0;
@@ -3101,7 +3098,7 @@ size_t malloc_usable_size(mem) Void_t* mem;
/* Utility to update current_mallinfo for malloc_stats and mallinfo() */
-#if 0
+#ifdef DEBUG
static void malloc_update_mallinfo()
{
int i;
@@ -3139,7 +3136,7 @@ static void malloc_update_mallinfo()
current_mallinfo.keepcost = chunksize(top);
}
-#endif /* 0 */
+#endif /* DEBUG */
@@ -3158,7 +3155,7 @@ static void malloc_update_mallinfo()
*/
-#if 0
+#ifdef DEBUG
void malloc_stats()
{
malloc_update_mallinfo();
@@ -3173,19 +3170,19 @@ void malloc_stats()
(unsigned int)max_n_mmaps);
#endif
}
-#endif /* 0 */
+#endif /* DEBUG */
/*
mallinfo returns a copy of updated current mallinfo.
*/
-#if 0
+#ifdef DEBUG
struct mallinfo mALLINFo()
{
malloc_update_mallinfo();
return current_mallinfo;
}
-#endif /* 0 */
+#endif /* DEBUG */
OpenPOWER on IntegriCloud