* @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. */
| 957 | * @param max_used is a pointer to get the maximum memory used. |
| 958 | */ |
| 959 | rt_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 | } |
| 971 | RTM_EXPORT(rt_memory_info); |
| 972 | |
| 973 | #if defined(RT_USING_SLAB) && defined(RT_USING_SLAB_AS_HEAP) |