summaryrefslogtreecommitdiff
path: root/common/core/src/ux_system_initialize.c
diff options
context:
space:
mode:
authorScott Larson <[email protected]>2020-10-09 12:39:54 -0700
committerScott Larson <[email protected]>2020-10-09 12:39:54 -0700
commit3f1e20df866441bd7e3e8a45fffe1d5ab0413002 (patch)
treea4fd231c2da5829f8913d0c92d633e4173f2fa33 /common/core/src/ux_system_initialize.c
parented83d6f07d3ef30993be946b5889aaba816b1f17 (diff)
6.1 Releasev6.1_rel
Diffstat (limited to 'common/core/src/ux_system_initialize.c')
-rw-r--r--common/core/src/ux_system_initialize.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/common/core/src/ux_system_initialize.c b/common/core/src/ux_system_initialize.c
index b232f8d..17c0d3a 100644
--- a/common/core/src/ux_system_initialize.c
+++ b/common/core/src/ux_system_initialize.c
@@ -65,7 +65,7 @@ UCHAR _ux_system_ecm_interface_descriptor_structure[] = {1,1
/* FUNCTION RELEASE */
/* */
/* _ux_system_initialize PORTABLE C */
-/* 6.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -101,6 +101,10 @@ UCHAR _ux_system_ecm_interface_descriptor_structure[] = {1,1
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
+/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
+/* verified memset and memcpy */
+/* cases, */
+/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _ux_system_initialize(VOID *regular_memory_pool_start, ULONG regular_memory_size,
@@ -114,7 +118,7 @@ UINT status;
ULONG memory_pool_offset;
/* Reset memory block */
- _ux_utility_memory_set(regular_memory_pool_start, 0, regular_memory_size);
+ _ux_utility_memory_set(regular_memory_pool_start, 0, regular_memory_size); /* Use case of memset is verified. */
/* Set the _ux_system structure at the start of our regular memory */
_ux_system = (UX_SYSTEM *) regular_memory_pool_start;
@@ -207,7 +211,7 @@ ULONG memory_pool_offset;
_ux_system -> ux_system_cache_safe_memory_pool_start = (UX_MEMORY_BLOCK *) int_memory_pool_start;
/* Reset this memory block */
- _ux_utility_memory_set(_ux_system -> ux_system_cache_safe_memory_pool_start, 0, _ux_system -> ux_system_cache_safe_memory_pool_size);
+ _ux_utility_memory_set(_ux_system -> ux_system_cache_safe_memory_pool_start, 0, _ux_system -> ux_system_cache_safe_memory_pool_size); /* Use case of memset is verified. */
/* Build the first free memory block */
memory_block = _ux_system -> ux_system_cache_safe_memory_pool_start;
@@ -215,6 +219,15 @@ ULONG memory_pool_offset;
memory_block -> ux_memory_block_status = UX_MEMORY_UNUSED;
}
+#ifdef UX_ENABLE_MEMORY_STATISTICS
+ _ux_system -> ux_system_regular_memory_pool_base = (UCHAR *) _ux_system -> ux_system_regular_memory_pool_start;
+ _ux_system -> ux_system_regular_memory_pool_min_free = _ux_system -> ux_system_regular_memory_pool_free;
+ _ux_system -> ux_system_cache_safe_memory_pool_base = (UCHAR *) _ux_system -> ux_system_cache_safe_memory_pool_start;
+ _ux_system -> ux_system_cache_safe_memory_pool_min_free = _ux_system -> ux_system_cache_safe_memory_pool_free;
+
+ /* Other fields are kept zero. */
+#endif
+
#ifdef UX_ENABLE_DEBUG_LOG
/* Obtain memory for storing the debug log. */