BojanJurca / Esp32_oscilloscope

ESP32 oscilloscope - see the signals through Web browser the way ESP32 sees them
Creative Commons Zero v1.0 Universal
780 stars 90 forks source link

Memory fragmentation #12

Closed BojanJurca closed 2 years ago

BojanJurca commented 2 years ago

There is a minor memory leak in LwIP sockets for IDF < 4, see: https://github.com/espressif/esp-idf/issues/8168

Minor memory leak causes just a minor problem in single-threaded environment but in multi-threaded environment it causes more serious memory fragmentation.

A workaround is engaging each of the available sockets at the very beginning (by calling HTTP server 10 times through local loopback) so there are not going to be any memory leaks afterwards and hence also no memory fragmentation.

I'll keep this issue opened until the next release. Meanwhile please replace Esp32_oscilloscope.ino file from release package with the latest one found in repository.

BojanJurca commented 2 years ago

The use of IDF 4.4 fixes the problem.