diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-08 20:09:56 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-08 20:09:56 +0000 |
commit | 3c1be2fad4644940527af1a0edad183cbccca22f (patch) | |
tree | 44af36ee8cd57ab74fbff7a5ccae11240cd7038b | |
parent | 2010-07-08 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-3c1be2fad4644940527af1a0edad183cbccca22f.tar.bz2 |
2010-07-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/malloc_initialize.c: Clean up sbrk path now that a
test is available.
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libcsupport/src/malloc_initialize.c | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 6c4720aa1f..039d7e8d66 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2010-07-08 Joel Sherrill <joel.sherrill@oarcorp.com> + + * libcsupport/src/malloc_initialize.c: Clean up sbrk path now that a + test is available. + 2010-07-07 Joel Sherrill <joel.sherrill@oarcorp.com> * libcsupport/src/open.c: Formatting and improve comment. 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; } /* |