mirror of
https://github.com/esphome/esphome.git
synced 2026-08-26 08:06:21 +00:00
ac259c156506d3d48a1842bfc5c77db9e08993ef
Segment pool entries are 20 bytes on this build, not the nominal 16 that struct tcp_seg suggests; the comment now quotes the measured figure. The MEM_SIZE justification did not close as written: two connections at ~6KB each is ~12KB, which fits inside the old 16KB heap. The missing term is that mem.c is first-fit, so what has to be free is a contiguous 1.5KB block, and at 75% occupancy interleaved with ARP, DHCP/DNS and mDNS allocations the largest run collapses long before the total does. That is also why the failure looked intermittent. Spelled out in both the Python comment and the header template. Hoist the lwIP sizing values to module constants so the two numeric invariants can be tested: the segment pool must stay above the per-PCB send queue, and MEM_SIZE must stay under 64000 or lwIP widens mem_size_t to u32_t. Both were previously enforced by prose alone, and the first would silently rebuild the starvation this change removes. The generated header is byte identical.
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
603 MiB
Languages
C++
57.7%
Python
41.7%
C
0.3%
JavaScript
0.2%
