rtos2-utils/src/debug/heap_stats.cpp
2024-06-19 18:17:09 +02:00

48 lines
589 B
C++

/*
* heap_stats.cpp
*
* Created on: Nov 21, 2023
* Author: Dario
*/
#include <sta/rtos/debug/heap_stats.hpp>
#ifdef STA_DEBUGGING_ENABLED_NP
#include <FreeRTOS.h>
#include <cmsis_os2.h>
namespace sta
{
namespace rtos
{
size_t getAvailableHeapSpace()
{
return stats.xAvailableHeapSpaceInBytes;
}
size_t getNumAllocs()
{
return stats.xNumberOfSuccessfulAllocations;
}
size_t getNumFrees()
{
return stats.xNumberOfSuccessfulFrees;
}
void printHeapStats()
{
}
} // namespace rtos
} // namespace sta
#endif // STA_DEBUGGING_ENABLED