From 8ecbc3826edfbfebabf5b9b75243df8b04421073 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 4 Feb 2020 13:56:41 +0100 Subject: 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. --- cpukit/score/src/wkspace.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'cpukit/score/src/wkspace.c') 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; -- cgit v1.2.3