From 71d539bc5c366feaa648a2356a50cb8b3e0bebcc Mon Sep 17 00:00:00 2001 From: elmo128 <60213508+elmo128@users.noreply.github.com> Date: Wed, 20 Sep 2023 20:12:05 +0200 Subject: [PATCH] debug_mem: print min free heap --- src/mining.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mining.cpp b/src/mining.cpp index 0b7dccb..f8ca70e 100644 --- a/src/mining.cpp +++ b/src/mining.cpp @@ -116,7 +116,7 @@ void runStratumWorker(void *name) { Serial.printf("\n[WORKER] Started. Running %s on core %d\n", (char *)name, xPortGetCoreID()); #ifdef DEBUG_MEMORY - Serial.printf("### [Total Heap / Free heap]: %d / %d \n", ESP.getHeapSize(), ESP.getFreeHeap()); + Serial.printf("### [Total Heap / Free heap / Min free heap]: %d / %d / %d \n", ESP.getHeapSize(), ESP.getFreeHeap(), ESP.getMinFreeHeap()); #endif // connect to pool @@ -452,7 +452,7 @@ void runMonitor(void *name) } #ifdef DEBUG_MEMORY - Serial.printf("### [Total Heap / Free heap]: %d / %d \n", ESP.getHeapSize(), ESP.getFreeHeap()); + Serial.printf("### [Total Heap / Free heap / Min free heap]: %d / %d / %d \n", ESP.getHeapSize(), ESP.getFreeHeap(), ESP.getMinFreeHeap()); Serial.printf("### Max stack usage: %d\n", uxTaskGetStackHighWaterMark(NULL)); #endif