One annoyance with ESP-IDF is its use of malloc internally, which means our firmware code which needs long uptimes has to be super careful about how we’re approaching things. Our code is in Nim, so it’s basically a matter of not using seq/string/ref T unless we absolutely need to (which is never, so far), but we’re still seeing some memory fragmentation and leaks with N days uptime on a busy system.
I think I need to go tweak LwIP and rip out esp_modem for a custom PPPoS implementation — as currently it leaks memory every socket creation (and we’re not the only ones to hit it)
Proprietary stacks in general tend to suck in that aspect - lack of visibility and control shows itself especially sharply. Be it Espressif, Nordic or any other.
Though at least it's "open" in terms of open source, so we can (and have) hacked at some of the bits we've had to use to remove some of the malloc usage, but you're right.
I do wish we could've gone to Zephyr instead, it has real promise IMO. Though I'm biased because I prefer the Linux kernel-like approach haha
I think I need to go tweak LwIP and rip out esp_modem for a custom PPPoS implementation — as currently it leaks memory every socket creation (and we’re not the only ones to hit it)