I need a buffer of the size 153600 bytes
in my ESP32 project, but I could not create a static buffer in code nor can I malloc
the buffer.
The ESP32 itself reports:
ESP.getHeapSize() // = 402540
ESP.getFreeHeap() // = 376980
ESP.getPsramSize() // = 0
ESP.getFreePsram() // = 0
malloc(153600)
returns NULL
; I wrote a little loop which decrements by one and retries to malloc. The first time it works is malloc(126888)
so this seems to be the maximum buffer I can get.
(I tried it with different boards; one from eBay and one from a genuine distributor - no differences.)
Clearly the heap size is big enough. So I'm thinking that the RAM is possibly split into different chunks and no one is big enough for my buffer?
Is there any documentation which explains this behavior?