mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-11 21:52:28 +00:00
54114553c1
* Memmgr: heap_get_max_free_block function. Add "Maximum heap block" to os_info cmd. * Cli: split os_info into ps and free commands Co-authored-by: あく <alleteam@gmail.com>
33 lines
786 B
C
33 lines
786 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <cmsis_os2.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/** Memmgr heap enable thread allocation tracking
|
|
* @param thread_id - thread id to track
|
|
*/
|
|
void memmgr_heap_enable_thread_trace(osThreadId_t thread_id);
|
|
|
|
/** Memmgr heap disable thread allocation tracking
|
|
* @param thread_id - thread id to track
|
|
*/
|
|
void memmgr_heap_disable_thread_trace(osThreadId_t thread_id);
|
|
|
|
/** Memmgr heap get allocatred thread memory
|
|
* @param thread_id - thread id to track
|
|
* @return bytes allocated right now
|
|
*/
|
|
size_t memmgr_heap_get_thread_memory(osThreadId_t thread_id);
|
|
|
|
/** Memmgr heap get the max contiguous block size on the heap
|
|
* @return size_t max contiguous block size
|
|
*/
|
|
size_t memmgr_heap_get_max_free_block();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|