From 3c1be2fad4644940527af1a0edad183cbccca22f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 8 Jul 2010 20:09:56 +0000 Subject: 2010-07-08 Joel Sherrill * libcsupport/src/malloc_initialize.c: Clean up sbrk path now that a test is available. --- cpukit/libcsupport/src/malloc_initialize.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cpukit/libcsupport') diff --git a/cpukit/libcsupport/src/malloc_initialize.c b/cpukit/libcsupport/src/malloc_initialize.c index 461fb432bf..72a2d6dbef 100644 --- a/cpukit/libcsupport/src/malloc_initialize.c +++ b/cpukit/libcsupport/src/malloc_initialize.c @@ -45,7 +45,7 @@ void RTEMS_Malloc_Initialize( { /* * If configured, initialize the statistics support - */ + */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); } @@ -59,13 +59,11 @@ void RTEMS_Malloc_Initialize( * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { - void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( + heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( heap_begin, sbrk_amount ); - - heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; - heap_begin = new_heap_begin; + heap_size = (uintptr_t) sbrk_amount; } /* -- cgit v1.2.3