summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/wkspace.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-04 13:56:41 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-06 15:19:35 +0100
commit8ecbc3826edfbfebabf5b9b75243df8b04421073 (patch)
treec2d172bad057023e18b2d53ded98eef69593e145 /cpukit/score/src/wkspace.c
parentconfig: CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY (diff)
downloadrtems-8ecbc3826edfbfebabf5b9b75243df8b04421073.tar.bz2
sysinit: Add RTEMS_SYSINIT_ZERO_MEMORY
Use a dedicate system initialization step to zero the memory used for the workspace and C program heap. This avoids dead code in case CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY is not configured.
Diffstat (limited to 'cpukit/score/src/wkspace.c')
-rw-r--r--cpukit/score/src/wkspace.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index 41c6cd3059..5a87ee4b83 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -90,7 +90,6 @@ void _Workspace_Handler_initialization(
{
Heap_Initialization_or_extend_handler init_or_extend;
uintptr_t remaining;
- bool do_zero;
bool unified;
uintptr_t page_size;
uintptr_t overhead;
@@ -101,7 +100,6 @@ void _Workspace_Handler_initialization(
remaining += _Workspace_Space_for_TLS( page_size );
init_or_extend = _Heap_Initialize;
- do_zero = rtems_configuration_get_do_zero_of_workspace();
unified = rtems_configuration_get_unified_work_area();
overhead = _Heap_Area_overhead( page_size );
@@ -112,10 +110,6 @@ void _Workspace_Handler_initialization(
area = _Memory_Get_area( mem, i );
free_size = _Memory_Get_free_size( area );
- if ( do_zero ) {
- memset( _Memory_Get_free_begin( area ), 0, free_size );
- }
-
if ( free_size > overhead ) {
uintptr_t space_available;
uintptr_t size;