diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-11-10 14:40:13 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-11-10 14:40:13 +0000 |
commit | b4f635e9d00dc0dfa871e886b9f130e0798b2f82 (patch) | |
tree | 0f8ccbe555f1491c4a5c9b5f7f825b11d332eaef /cpukit/libcsupport/src/malloc_initialize.c | |
parent | 2011-11-10 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-b4f635e9d00dc0dfa871e886b9f130e0798b2f82.tar.bz2 |
2011-11-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1924/cpukit
* sapi/include/rtems/config.h: New fields stack_space_size,
unified_work_area, and stack_allocator_avoids_work_space in
rtems_configuration_table.
* sapi/include/confdefs.h: Removed rtems_unified_work_area (this is
now part of the Configuration). Separate work space and stack space
estimate. Added CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
configuration option.
* libmisc/shell/main_wkspaceinfo.c, score/src/wkspace.c,
libcsupport/src/malloc_initialize.c: Update due to API changes.
Diffstat (limited to 'cpukit/libcsupport/src/malloc_initialize.c')
-rw-r--r-- | cpukit/libcsupport/src/malloc_initialize.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cpukit/libcsupport/src/malloc_initialize.c b/cpukit/libcsupport/src/malloc_initialize.c index 3c8c14c188..eb10ca52e4 100644 --- a/cpukit/libcsupport/src/malloc_initialize.c +++ b/cpukit/libcsupport/src/malloc_initialize.c @@ -35,7 +35,6 @@ void RTEMS_Malloc_Initialize( } #else rtems_malloc_statistics_t rtems_malloc_statistics; -extern bool rtems_unified_work_area; void RTEMS_Malloc_Initialize( void *heap_begin, @@ -43,6 +42,7 @@ void RTEMS_Malloc_Initialize( size_t sbrk_amount ) { + bool separate_areas = !rtems_configuration_get_unified_work_area(); /* * If configured, initialize the statistics support */ @@ -86,10 +86,7 @@ void RTEMS_Malloc_Initialize( * left over from another process. This would be a security violation. */ - if ( - !rtems_unified_work_area - && rtems_configuration_get_do_zero_of_workspace() - ) { + if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); } @@ -99,7 +96,7 @@ void RTEMS_Malloc_Initialize( * STDIO cannot work because there will be no buffers. */ - if ( !rtems_unified_work_area ) { + if ( separate_areas ) { uintptr_t status = _Protected_heap_Initialize( RTEMS_Malloc_Heap, heap_begin, |