What caps argument to give to ESP32 heap_caps_...() functions?
Almost all of the ESP32 heap_caps_...() functions take a uint32_t caps argument.
In case you just want to have general information about the heap, use
heap_caps_default_example.cpp
MALLOC_CAP_DEFAULTas an argument.
Most applications will rarely use any other value than MALLOC_CAP_DEFAULT. Other values which are used semi-frequently include:
MALLOC_CAP_SPIRAMMALLOC_CAP_INTERNAL(memory must not be located in SPI RAM)
For more details on how the memory of the ESP32 is organized, see the official documentation.
Check out similar posts by category:
ESP8266/ESP32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow