From 494c0b32c1acb0c8d2f355cbb4c427395aa7d579 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 5 Jul 2007 18:02:02 +0200 Subject: 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. --- common/dlmalloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/dlmalloc.c') 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 /* -- cgit v1.2.3