Replaces usage of String with const char* in heap debug function
Replaces String with const char* in printHeapDebugData to reduce heap fragmentation.
This commit is contained in:
@@ -7,6 +7,6 @@
|
|||||||
#define HEAP_DEBUG_MESSAGE(location)
|
#define HEAP_DEBUG_MESSAGE(location)
|
||||||
#endif
|
#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);
|
Serial.println("Heap: " + String(ESP.getMinFreeHeap()/1024) + "\t" + String(ESP.getFreeHeap()/1024) + "\t" + String(ESP.getMaxAllocHeap()/1024) + "\t" + location);
|
||||||
}
|
}
|
Reference in New Issue
Block a user