diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-02-04 13:56:41 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-02-06 15:19:35 +0100 |
commit | 8ecbc3826edfbfebabf5b9b75243df8b04421073 (patch) | |
tree | c2d172bad057023e18b2d53ded98eef69593e145 /cpukit/include/rtems/score/memory.h | |
parent | 1d43a976a83f1b815ec07ce00e3db31fbd36aac4 (diff) |
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/include/rtems/score/memory.h')
-rw-r--r-- | cpukit/include/rtems/score/memory.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 <rtems/confdefs.h> 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 |