MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_memory_info

Function rt_memory_info

src/kservice.c:959–970  ·  view source on GitHub ↗

* @brief This function will caculate the total memory, the used memory, and * the max used memory. * * @param total is a pointer to get the total size of the memory. * * @param used is a pointer to get the size of memory used. * * @param max_used is a pointer to get the maximum memory used. */

Source from the content-addressed store, hash-verified

957* @param max_used is a pointer to get the maximum memory used.
958*/
959rt_weak void rt_memory_info(rt_size_t *total,
960 rt_size_t *used,
961 rt_size_t *max_used)
962{
963 rt_base_t level;
964
965 /* Enter critical zone */
966 level = _heap_lock();
967 _MEM_INFO(total, used, max_used);
968 /* Exit critical zone */
969 _heap_unlock(level);
970}
971RTM_EXPORT(rt_memory_info);
972
973#if defined(RT_USING_SLAB) && defined(RT_USING_SLAB_AS_HEAP)

Callers 6

cmd_freeFunction · 0.85
single_showFunction · 0.85
get_free_heap_sizeFunction · 0.85
esMEMS_FreeMemSizeFunction · 0.85
utest_tc_initFunction · 0.85
utest_tc_cleanupFunction · 0.85

Calls 2

_heap_lockFunction · 0.85
_heap_unlockFunction · 0.85

Tested by 1

esMEMS_FreeMemSizeFunction · 0.68