From c450df59aaf1a5fb190887a894d1db90b7dedd48 Mon Sep 17 00:00:00 2001 From: Jan Philipp Ecker Date: Sat, 2 Aug 2025 22:53:38 +0200 Subject: [PATCH] Replaces usage of String with const char* in heap debug function Replaces String with const char* in printHeapDebugData to reduce heap fragmentation. --- src/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.h b/src/debug.h index 8cc1efc..65f19e1 100644 --- a/src/debug.h +++ b/src/debug.h @@ -7,6 +7,6 @@ #define HEAP_DEBUG_MESSAGE(location) #endif -inline void printHeapDebugData(String location){ +inline void printHeapDebugData(const char *location){ Serial.println("Heap: " + String(ESP.getMinFreeHeap()/1024) + "\t" + String(ESP.getFreeHeap()/1024) + "\t" + String(ESP.getMaxAllocHeap()/1024) + "\t" + location); } \ No newline at end of file