Page 1 of 1

Tagging heap assigned to non-PSRAM (low) memory?

Posted: Sun Jul 30, 2023 2:44 pm
by tschak909
Hi everyone.

I am in the midst of debugging a very complex set of memory leaks in #FujiNet, around the Network sub-device.

The Heap tracer is very useful, however, I do wish I could actually get function names, instead of function pointers, in the dump, is there a way to facilitate that?

Also, is there a way to figure out which portion of memory a given allocator is using? I need to see if something I'm doing in my code is causing an allocation to the low memory, instead of the PSRAM.

-Thom

Re: Tagging heap assigned to non-PSRAM (low) memory?

Posted: Sun Jul 30, 2023 6:57 pm
by ESP_igrr
Hi Thom,

Function pointers should be automatically decoded on the host side if you use IDF Monitor (https://docs.espressif.com/projects/esp ... s-decoding).

Doing this in the application itself is not viable, unfortunately.
tschak909 wrote: Also, is there a way to figure out which portion of memory a given allocator is using?
I'm not 100% sure what you mean by "given memory allocator" but perhaps heap_caps_dump or heap_caps_dump_all helps? (https://docs.espressif.com/projects/esp ... _dump_allv)

Re: Tagging heap assigned to non-PSRAM (low) memory?

Posted: Tue Aug 01, 2023 3:45 pm
by MicroController
tschak909 wrote:
Sun Jul 30, 2023 2:44 pm
Also, is there a way to figure out which portion of memory a given allocator is using? I need to see if something I'm doing in my code is causing an allocation to the low memory, instead of the PSRAM.
The heap trace dump should say "Internal" or "PSRAM" respectively for each entry...
Not sure what "allocator" you are referring to.