Just to add that you could experiment with RESIZABLE_JSVARS in build_platform_config. That will let Espruino allocate variables in blocks using malloc - it's what gets used on Linux.
It means that it'll allocate only what it needs - although it can't reclaim memory after it has been allocated so I wonder how useful it is.
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.
Just to add that you could experiment with RESIZABLE_JSVARS in build_platform_config. That will let Espruino allocate variables in blocks using malloc - it's what gets used on Linux.
It means that it'll allocate only what it needs - although it can't reclaim memory after it has been allocated so I wonder how useful it is.