diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-08-09 16:48:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-10-25 14:54:06 +0200 |
commit | 47a3cd8f73780bad3eff5135f0eb58e8c98af91d (patch) | |
tree | 8acdfc6ebe5d596f9c6b974e6c460dc69e824e3c /cpukit/libcsupport/src/malloc.c | |
parent | score: Append to free list in _Heap_Extend() (diff) | |
download | rtems-47a3cd8f73780bad3eff5135f0eb58e8c98af91d.tar.bz2 |
score: Work area initialization API change
The work areas (RTEMS work space and C program heap) will be initialized
now in a separate step and are no longer part of
rtems_initialize_data_structures(). Initialization is performed with
tables of Heap_Area entries. This allows usage of scattered memory
areas present on various small scale micro-controllers.
The sbrk() support API changes also. The bsp_sbrk_init() must now deal
with a minimum size for the first memory chunk to take the configured
work space size into account.
Diffstat (limited to 'cpukit/libcsupport/src/malloc.c')
-rw-r--r-- | cpukit/libcsupport/src/malloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c index 0fff1d011c..dea6f8f3c7 100644 --- a/cpukit/libcsupport/src/malloc.c +++ b/cpukit/libcsupport/src/malloc.c @@ -55,8 +55,7 @@ void *malloc( return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { - if (rtems_malloc_sbrk_helpers) - return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); + return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; |