WIP: More ESP32 memory management

This commit is contained in:
Chad Attermann committed 2024-07-03 13:30:05 -06:00
1 parent 36ff1c5f00
commit 25741cf235
3 files changed
+13 -4

No files matched your search

+1 -1
View File
@@ -377,7 +377,7 @@ bool Packet::unpack() {
update_hash();
}
catch (std::exception& e) {
error(std::string("Received malformed packet, dropping it. The contained exception was: ") + e.what());
ERROR(std::string("Received malformed packet, dropping it. The contained exception was: ") + e.what());
return false;
}
+2 -2
View File
@@ -39,8 +39,8 @@ pass any traffic before being instantiated.
Reticulum::Reticulum() : _object(new Object()) {
MEM("Reticulum default object creating..., this: " + std::to_string((uintptr_t)this) + ", data: " + std::to_string((uintptr_t)_object.get()));
INFO("Total memory: " + std::to_string(OS::heap_available()));
INFO("Total flash: " + std::to_string(OS::storage_available()));
INFO("Total memory: " + std::to_string(OS::heap_size()));
INFO("Total flash: " + std::to_string(OS::storage_size()));
// Initialize random number generator
TRACE("Initializing RNG...");
+10 -1
View File
@@ -3714,7 +3714,16 @@ TRACE("Transport::write_path_table: buffer size " + std::to_string(Persistence::
/*static*/ void Transport::dump_stats() {
#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_NRF52_ADAFRUIT)
#if defined(ESP32)
TRACE("Psram size: " + std::to_string(ESP.getPsramSize()));
TRACE("Psram free: " + std::to_string(ESP.getFreePsram()));
TRACE("Psram min free: " + std::to_string(ESP.getMinFreePsram()));
TRACE("Psram max alloc: " + std::to_string(ESP.getMaxAllocPsram()));
TRACE("Heap size: " + std::to_string(ESP.getHeapSize()));
TRACE("Heap free: " + std::to_string(ESP.getFreeHeap()));
TRACE("Heap min free: " + std::to_string(ESP.getMinFreeHeap()));
TRACE("Heap max alloc: " + std::to_string(ESP.getMaxAllocHeap()));
#elif defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_NRF52_ADAFRUIT)
if (loglevel() == LOG_TRACE) {
dbgMemInfo();
}