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/include/rtems/score/memory.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cpukit/include/rtems/score/memory.h') diff --git a/cpukit/include/rtems/score/memory.h b/cpukit/include/rtems/score/memory.h index f26c7f4031..ffc4897ed5 100644 --- a/cpukit/include/rtems/score/memory.h +++ b/cpukit/include/rtems/score/memory.h @@ -331,6 +331,19 @@ void *_Memory_Allocate( */ void _Memory_Fill( const Memory_Information *information, int c ); +/** + * @brief Indicates if the memory is zeroed during system initialization. + * + * This value is provided via in case + * CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY is defined. + */ +extern const bool _Memory_Zero_before_use; + +/** + * @brief Zeros all free memory areas of the system. + */ +void _Memory_Zero_free_areas( void ); + /** @} */ #ifdef __cplusplus -- cgit v1.2.3