Not enough size of heap
Posted: Mon Nov 20, 2023 7:49 am
Good day. I have a problem with the module ESP32-WROOM-32E-N8. I need to create 10 parallel SSL connections to different servers. I'm using the mbedtls library. After starting the program, I have 187 kilobytes free (heap size: 187292 bytes). I only have enough memory for 5 connections. After five connections, only about 300 bytes remain (heap size: 364 bytes). Are there any tricks to get 10 connections with this module? Is this even realistic?
Next question. There are the same modules with additional memory of 2 megabytes PSRAM (ESP32-WROOM-32E-N8R2). Can PSRAM be used as a heap? Is this memory suitable for creating tasks for additional SSL connections?
Next question. There are the same modules with additional memory of 2 megabytes PSRAM (ESP32-WROOM-32E-N8R2). Can PSRAM be used as a heap? Is this memory suitable for creating tasks for additional SSL connections?
Thanks for the help.Used static DRAM: 60340 bytes ( 120396 remain, 33.4% used)
.data size: 29900 bytes
.bss size: 30440 bytes
Used static IRAM: 89034 bytes ( 42038 remain, 67.9% used)
.text size: 88007 bytes
.vectors size: 1027 bytes
Used Flash size : 840311 bytes
.text : 634443 bytes
.rodata : 205612 bytes
Total image size: 959245 bytes (.bin may be padded larger)