Suggestions on how to track a memory leak ...
Suggestions on how to track a memory leak ...
I find that my app is leaking memory. I am executing a large amount of code (some mine, some third party) in a loop and I have a memory leak. I use the ESP-IDF esp_get_free_heap_size() after every 100 loop iterations and see that the free heap size is steadily decreasing. What I'm looking for is some guidance on how to debug memory leaks in an ESP32 environment. Does anyone have any thoughts on how to find lost heap memory?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Suggestions on how to track a memory leak ...
FreeRTOS has pvPortMalloc / vPortFree, and you can trace calls to it with a tool: http://www.freertos.org/trace
Or using macros:
http://www.freertos.org/rtos-trace-macros.html
Or using macros:
http://www.freertos.org/rtos-trace-macros.html
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Suggestions on how to track a memory leak ...
FYI I think I saw a merge request in the queue that fixes this.
Who is online
Users browsing this forum: MicroController and 234 guests