mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 18:22:32 +00:00
- Abstract the memory stats into its own class.
- Fix a bug with debug mqtt - nrf52 needs more love, there's a strange error while linking. Help appreciated
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "OSThread.h"
|
||||
#include "configuration.h"
|
||||
#include "memGet.h"
|
||||
#include <assert.h>
|
||||
|
||||
namespace concurrency
|
||||
@@ -75,12 +76,12 @@ bool OSThread::shouldRun(unsigned long time)
|
||||
void OSThread::run()
|
||||
{
|
||||
#ifdef DEBUG_HEAP
|
||||
auto heap = ESP.getFreeHeap();
|
||||
auto heap = memGet.getFreeHeap();
|
||||
#endif
|
||||
currentThread = this;
|
||||
auto newDelay = runOnce();
|
||||
#ifdef DEBUG_HEAP
|
||||
auto newHeap = ESP.getFreeHeap();
|
||||
auto newHeap = memGet.getFreeHeap();
|
||||
if (newHeap < heap)
|
||||
LOG_DEBUG("------ Thread %s leaked heap %d -> %d (%d) ------\n", ThreadName.c_str(), heap, newHeap, newHeap - heap);
|
||||
if (heap < newHeap)
|
||||
|
||||
Reference in New Issue
Block a user