Introduces new memory allocation functions, based on wled#4895 by @DedeHai * keep a minimum of 15KB RAM available to UI - improves stability * S3/S2/C3 automatically use "fast RTC Ram" for small data (reduces fragmentation) * auto-detects PSRAM (or no PSRAM) when firmware was built with -D BOARD_HAS_PSRAM * d_malloc() and d_calloc() prefer DRAM if possible (faster), but fall back to PSRAM when free RAM gets low.
This commit is contained in:
@@ -1133,6 +1133,8 @@ void serializeInfo(JsonObject root)
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
root[F("freestack")] = uxTaskGetStackHighWaterMark(NULL); //WLEDMM
|
||||
root[F("minfreeheap")] = ESP.getMinFreeHeap();
|
||||
auto maxFreeBlock = getContiguousFreeHeap();
|
||||
root[F("maxalloc")] = maxFreeBlock; // for upstream WLED compatibility
|
||||
#endif
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
#if defined(BOARD_HAS_PSRAM) || (ESP_IDF_VERSION_MAJOR > 3) // V4 can auto-detect PSRAM
|
||||
|
||||
Reference in New Issue
Block a user