Anyway, so then I decide to run the example console code to see if perhaps Espressif is doing something behind the scenes to tidy up. This if idf 4.2, which is what I am currently using. What happens is that every command seems to leak memory, not just those with parameters! However, if I run the same command twice there seems to be no leak... This is best explained with some example output:
Code: Select all
This is an example of ESP-IDF console component.
Type 'help' to get the list of commands.
Use UP/DOWN arrows to navigate through command history.
Press TAB when typing command name to auto-complete.
Your terminal application does not support escape sequences.
Line editing and history features are disabled.
On Windows, try using Putty instead.
esp32> free
Unrecognized command
258452 free
esp32> heap
I (40521) cmd_system: min heap size: 258440
esp32> free
258428
esp32> free
258428
esp32> heap
I (51121) cmd_system: min heap size: 258416
esp32> free
258404
esp32> heap
I (55521) cmd_system: min heap size: 258392
esp32> heap
I (57421) cmd_system: min heap size: 258392
esp32> free
258384
esp32>
Anyone got an idea what's going on? Does arg_freetable() need to be called or not?