summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:02:02 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:02:02 +0200
commit494c0b32c1acb0c8d2f355cbb4c427395aa7d579 (patch)
tree08fd9b7ce10aa4f18de9ab55e6dad3043a9377cc
parent614ff8b708cf9b83b00aa996392d3d64fd898b14 (diff)
downloadbarebox-494c0b32c1acb0c8d2f355cbb4c427395aa7d579.tar.gz
barebox-494c0b32c1acb0c8d2f355cbb4c427395aa7d579.tar.xz
svn_rev_533
Comment out malloc_trim(). This functions gives back memory to the system via negative calls to sbrk(). This is completely useless in U-Boot since noone else could make use of this memory.
-rw-r--r--common/dlmalloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 54a979066e..51f76475eb 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1340,8 +1340,10 @@ void fREe(mem) Void_t* mem;
set_head(p, sz | PREV_INUSE);
top = p;
+#ifdef USE_MALLOC_TRIM
if ((unsigned long)(sz) >= (unsigned long)trim_threshold)
malloc_trim(top_pad);
+#endif
return;
}
@@ -1836,7 +1838,7 @@ void cfree(mem) Void_t *mem;
Malloc_trim returns 1 if it actually released any memory, else 0.
*/
-
+#ifdef USE_MALLOC_TRIM
#if __STD_C
int malloc_trim(size_t pad)
#else
@@ -1892,7 +1894,7 @@ int malloc_trim(pad) size_t pad;
}
}
}
-
+#endif
/*