Try to answer question 1:
Since Espruino creates its task with xTAskCreatePinnedToCore() in task_init(), the available RAM size for Espruino depends on the available DRAM heap which is dynamically allocated from the data RAM (composed of DRAM and I/DRAM in several non-contiguous regions).
Since ESP32 has 328 KiB of data RAM, the theoretical maximum DRAM heap for Espruino is 328 KiB. But the stack size needs to be allocated from the heap. Other tasks also take up the data RAM.
In the end, the total available heap (data RAM) for Espruino may be less than 190 KiB if the Bluetooth stack is used.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Try to answer question 1:
Since Espruino creates its task with xTAskCreatePinnedToCore() in task_init(), the available RAM size for Espruino depends on the available DRAM heap which is dynamically allocated from the data RAM (composed of DRAM and I/DRAM in several non-contiguous regions).
Since ESP32 has 328 KiB of data RAM, the theoretical maximum DRAM heap for Espruino is 328 KiB. But the stack size needs to be allocated from the heap. Other tasks also take up the data RAM.
In the end, the total available heap (data RAM) for Espruino may be less than 190 KiB if the Bluetooth stack is used.