mirror of
https://github.com/esphome/esphome.git
synced 2026-02-20 08:25:35 -07:00
ba1bbaf67db7272760d81add9736b8c965cb4d2e
This is the culmination of months of work to reduce heap churn throughout the ESPHome codebase. By systematically eliminating unnecessary dynamic allocations (StaticVector, FixedVector, const char* instead of std::string, pre-allocated buffers, etc.), heap functions are now called so infrequently that they can safely be moved from IRAM to flash. Enable CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH by default, which moves malloc/free/realloc from IRAM to flash. This is safe because: - Heap functions should never be called from ISRs - CONFIG_SPI_MASTER_ISR_IN_IRAM is not enabled - Audio/video use pre-allocated ring buffers, not dynamic allocation Measured results: +6,124 bytes of heap freed. Add heap_in_iram advanced option as an escape hatch for users who need heap functions in IRAM for specific use cases.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
377 MiB
Languages
C++
64.2%
Python
35.5%
C
0.2%
