How to optimize RAM utilization
Posted: Wed Oct 11, 2023 2:25 pm
We are using esp-azure library version 1.8.0 in our project. We observed that azure is taking more then 50% IRAM of my total RAM. We had integrated iothub_client_sample_mqtt sample code into our project. Azure functionality is working fine. But we are looking to optimize the RAM size.
We also observed RAM utilization get rise in nimBLE stack as well.
Right now because of this issue we are facing memory allocation issue. Our current memory details is as follows. Also optimization level is (-Os). If we select optimization level as Debug (-Og) then our IRAM goes to 94%.
Used static DRAM: 58796 bytes ( 65784 remain, 47.2% used)
.data size: 21996 bytes
.bss size: 36800 bytes
Used static IRAM: 116886 bytes ( 14186 remain, 89.2% used)
.text size: 115859 bytes
.vectors size: 1027 bytes
Used Flash size : 1002431 bytes
.text : 804691 bytes
.rodata : 197484 bytes
Total image size: 1141313 bytes (.bin may be padded larger)
Following is our setup details for your reference.
ESP-IDF Version : 4.4.2
esp-azure version : 1.8.0
Chip : Wroom-32E
Flash : 16 MB
Please let me know if any inputs.
Thanks
We also observed RAM utilization get rise in nimBLE stack as well.
Right now because of this issue we are facing memory allocation issue. Our current memory details is as follows. Also optimization level is (-Os). If we select optimization level as Debug (-Og) then our IRAM goes to 94%.
Used static DRAM: 58796 bytes ( 65784 remain, 47.2% used)
.data size: 21996 bytes
.bss size: 36800 bytes
Used static IRAM: 116886 bytes ( 14186 remain, 89.2% used)
.text size: 115859 bytes
.vectors size: 1027 bytes
Used Flash size : 1002431 bytes
.text : 804691 bytes
.rodata : 197484 bytes
Total image size: 1141313 bytes (.bin may be padded larger)
Following is our setup details for your reference.
ESP-IDF Version : 4.4.2
esp-azure version : 1.8.0
Chip : Wroom-32E
Flash : 16 MB
Please let me know if any inputs.
Thanks