Added STA_DEBUG_HEAP_STATS for debugging

This commit is contained in:
dario
2023-11-21 21:47:58 +01:00
parent 615900f16e
commit dccdacae42
2 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
/*
* heap_stats.hpp
*
* Created on: Nov 21, 2023
* Author: Dario
*/
#ifndef RTOS_DEBUG_HEAP_STATS_HPP
#define RTOS_DEBUG_HEAP_STATS_HPP
#include <sta/config.hpp>
#ifdef STA_DEBUGGING_ENABLED
#include <sta/debug/debug.hpp>
void printHeapStats();
/**
* @brief Print the current heap stats.
*/
# define STA_DEBUG_HEAP_STATS() printHeapStats()
#else
# define STA_DEBUG_HEAP_STATS() ((void)0)
#endif // STA_DEBUGGING_ENABLED
#endif /* RTOS_DEBUG_HEAP_STATS_HPP */