3 ms·
Haha I just used this code. My little ESP32 data acquisition project has been running two days since switching to the PrintPreallocate function with essentially
by dls2016 6y ago
Haha I just used this code. My little ESP32 data acquisition project has been running two days since switching to the PrintPreallocate function with essentially constant memory usage so ¯\_(ツ)_/¯. Way too many other things to worry about.
- elcritch 6y agoExactly, if their inputs are fairly well known and tested, adding 5 magic bytes is hackish but effective. It could take days or weeks to debug that properly, if at all. Nice you were able to get constant memory. I was getting 40byte max memory usage difference between identical RPC calls on the esp32, but that seems due to Nim’s ARC garbage collector. Sometimes +20 bytes, sometimes -20 bytes but not leaking. Though maybe it’s an esp-idf thing. Took me a bit to just call it good and focus on more important things. ¯\_(ツ)_/¯