I would like to allocate a large buffer of 150KB on the ESP32 (without using the SPIRAM). I had a look at the documentation and it seems like it should be possible to allocate up to 160Kb in DRAM however I do cannot find out how to do that (from Arduino IDE).
I tried static allocation via:
Code: Select all
static uint8_t buffer[1024*150]
I also tried to malloc the memory on the heap with
Code: Select all
uint8_t * buffer = malloc(1024*150);
I am experimenting on an otherwise empty .ino script to minimize external memory fragmentation (no Wifi library or anything else that may use memory in the background). I am using Arduino 2.1 IDE and I tried building the script for several different ESP32 profiles: "ESP32 Dev Module" , "ESP32 Wrover module" ... but it always fails.
Doesn't the ESP32 memory map contain a contiguous 150Kb of RAM available ? Note that when compiling for a ESP32-S3 module instead, I have no problem fitting the 150K buffer in memory.
Thanks in advance for any help/pointers on how to increase the maximum amount of contiguous memory that can be allocated on ESP32 (without using the SPIRAM).