Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESP8266: Trim TCP segment pbuf before sending
Because LWIP_NETIF_TX_SINGLE_PBUF is enabled (and must be enabled, since lower leel stack can't do scatter/gather), all segments are preallocated to full MSS, even if the resulting segment is much smalller. When we are done with the segment and about to send it out, trim the pbuf memory allocation to exactly the size required. This is signioficant because pbufs can spend significant time in unacked queue, and trimming them ASAP reduces peak memory usage when multiple connections are active. Signed-off-by: Deomid "rojer" Ryabkov <rojer@rojer.me>
- Loading branch information