How to Figure out Who's Hogging Memory?
Posted: Sun Oct 22, 2023 6:25 pm
The latest release of ESP-IDF has a heap memory debugging hook feature*, that allows you to run a function every time memory allocation is performed and succeeds. However, this feature does not exist in v4.4, which means Arduino can't use it, since that requires ESP-IDF v4.4. My problem is that I have something in my program which is taking up a lot of memory, but not quite enough to crash it, so the crash happens right afterwards, and I don't know how to figure out what's causing the large memory footprint, since by the time the crash occurs, it happens in some other allocation call. Is there some analogous way to do memory allocation hooks in v4.4, that's usable by Arduino?
* https://docs.espressif.com/projects/esp ... debug.html
See "Heap Allocation and Free Function Hooks"
* https://docs.espressif.com/projects/esp ... debug.html
See "Heap Allocation and Free Function Hooks"