summaryrefslogtreecommitdiff
path: root/common/dlmalloc.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-09-28 23:30:47 +0200
committerWolfgang Denk <wd@denx.de>2010-09-28 23:30:47 +0200
commit2e6e1772c0e34871769be4aef79748fe3e47d953 (patch)
tree00e4e19d7bccd2a1cd5753854ff4c2b8a26bebb0 /common/dlmalloc.c
parent1e4e5ef0469050f014aee1204dae8a9ab6053e49 (diff)
parent3df61957938586c512c17e72d83551d190400981 (diff)
downloadolio-uboot-2014.01-2e6e1772c0e34871769be4aef79748fe3e47d953.tar.xz
olio-uboot-2014.01-2e6e1772c0e34871769be4aef79748fe3e47d953.zip
Merge branch 'next' of /home/wd/git/u-boot/next
Conflicts: include/ppc4xx.h Signed-off-by: Wolfgang Denk <wd@denx.de>
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 2276532da..ae5702dd5 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 */