Re: ESP32 Memory Allocation

2022-12-19 Thread Abdelatif Guettouche
There is no threshold or a way to decide where malloc will get its memory from. The memory available for the allocator is both the internal (SRAM) and external SPIRAM, if your request cannot be honored from the internal memory then the allocator will look into the external memory (but it's not dete

Re: ESP32 Memory Allocation

2022-12-19 Thread Gregory Nutt
POSIX does not support this capability with any uniform, standard interfaces. NuttX, however, does permit you to create and use as many separate heaps as you would like to.  See interfaces in include/nuttx/mm/mm.h For an example, look at the standard malloc/free implementation:  mm/umm_heap/

ESP32 Memory Allocation

2022-12-19 Thread Victor Benso
Hello, I'm running NuttX on an ESP32 with SPIRAM, when using malloc in an app, what is the threshold, if any, used in the decision of allocating internal or external memory? Is this a config parameter? Is there a proper way to control which region (internal or external) a specific allocation will