]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/dlmalloc.c
New implementation for internal handling of environment variables.
[karo-tx-uboot.git] / common / dlmalloc.c
index 2276532da7a8441c500c39b1716e23a2806a8c21..ae5702dd52ae178d0e0e16d46a173dbdd927d75c 100644 (file)
 
 \f
 
-
 /* 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 */
 
 \f
 
@@ -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 */
 
 
 \f