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

tschak909
Posts: 36
Joined: Mon Oct 26, 2020 8:17 pm

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

Postby tschak909 » Sun Jul 30, 2023 2:44 pm

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

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Sun Jul 30, 2023 6:57 pm

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)

MicroController
Posts: 1552
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

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

Postby MicroController » Tue Aug 01, 2023 3:45 pm

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.

Who is online

Users browsing this forum: Baidu [Spider], tharanilc and 254 guests