hide "slow strip" when compiling with HEAP_DEBUG

This commit is contained in:
Frank
2023-06-07 12:25:41 +02:00
parent b6f1a591ee
commit e6334d8e3d
2 changed files with 3 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ void esp_heap_trace_free_hook(void* ptr)
Serial.println("** free: attempt to free nullptr.");
} else {
size_t blocksize = heap_caps_get_allocated_size(ptr);
if (blocksize > 256000)
if ((blocksize < 1) || (blocksize > 256000))
Serial.println("**** free: bad pointer to " + String(blocksize) + "bytes.");
else
Serial.println("** free " + String(blocksize) + "bytes.");