• Ahh, I think really there are 2 options...

    • malloc the jsVars data at boot time. This should be totally fine to do with everything basically as-is - but it's not the same as RESIZABLE_JSVARS
    • RESIZABLE_JSVARS is where extra jsVars are allocated as needed, and it's what is done on Linux. The issue here is that in order to do that there's not just one jsVars array, but different 'blocks' of jsVars - since you can't just move a JsVar around in memory if some bit of code has its address in a pointer. Personally, I'd avoid doing that since having the different blocks slows down everything since it's no longer a simple lookup to find a variable's address from its reference.

    About 32 bits - yes, it's bad :) See http://www.espruino.com/Internals for the layout - 32 bits means vars are no longer 16 bytes each, but are 24 (IIRC) - so you now only get 2/3 of the amount of variables in the same RAM :(

About

Avatar for Gordon @Gordon started