summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/malloc_initialize.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-08 20:09:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-08 20:09:56 +0000
commit3c1be2fad4644940527af1a0edad183cbccca22f (patch)
tree44af36ee8cd57ab74fbff7a5ccae11240cd7038b /cpukit/libcsupport/src/malloc_initialize.c
parent2010-07-08 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-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.
Diffstat (limited to 'cpukit/libcsupport/src/malloc_initialize.c')
-rw-r--r--cpukit/libcsupport/src/malloc_initialize.c8
1 files changed, 3 insertions, 5 deletions
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;
}
/*