ESP32 memory allocation
Posted: Mon Aug 12, 2019 10:12 am
I have add memory diagnostocs to my application so that I may check for leaks/fragmentation.
and requesting capabilities:
I am suprised to see that I have MALLOC_CAP_EXEC 214,660 bytes free.
make -j8 size-components reports that the flash code size is >> 500,000.
What exactly is MALLOC_CAP_EXEC & how is it allocated to my program ?
I guess that MALLOC_CAP_EXEC is SRAM0 (192K), SRAM1(128K) but after cache I would have 256K maximum.
Why then do I have 214K MALLOC_CAP_EXEC free when my program is much larger?
Code: Select all
heap_caps_get_info()
Code: Select all
MALLOC_CAP_8BIT, MALLOC_CAP_EXEC, MALLOC_CAP_SPIRAM
make -j8 size-components reports that the flash code size is >> 500,000.
What exactly is MALLOC_CAP_EXEC & how is it allocated to my program ?
I guess that MALLOC_CAP_EXEC is SRAM0 (192K), SRAM1(128K) but after cache I would have 256K maximum.
Why then do I have 214K MALLOC_CAP_EXEC free when my program is much larger?