• 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).

    The available heap for a FreeRTOS task is all of the data RAM which is not statically allocated. https://github.com/espressif/esp-idf/issues/2042#issuecomment-396101249

    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.

About

Avatar for Ragtime @Ragtime started