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/.  That kind of wrapper can be used to provide another heap of memory with different properties.  The doeside is that you lose that memory from the generic malloc heap.


On 12/19/2022 7:26 AM, Victor Benso wrote:
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 happen?


Victor A. P. Benso

(47) 999-229-599
(65) 999-186-147


Reply via email to