Making sure that there is always a significant amout of RAM free is not a simple task...
Predictability at runtime of RAM usage is difficult and out-of-memory cpndition is a potential haphazard, especially with connected devices, such as a Web server. Malignant requests can mount a state of service denial...
Being able to contain - predict - at build time using resource planning the behavior of as many subsystemsas possible contributes to the robustness of the solution. It obviously comes with a price, in this case 50% of the resource: 1 / numberOfPages and numberOfPages >= 2. In other words, the more pages available, the more affordable it becomes. Unfortunately that is mostly defined by the design of the memory laoyut and limited placement options for the given firmware and saved code.
The time will come when interpreting code in ROM has to be implemented (interpreting directly, without paging-in)... a challenge to the existing, currently straight forward implementation, process and lfe cycle architecture...
Btw, having get and set properties' implemented would nicely support a transparent access to things -properties of 'objects' - in ROM.
How difficult is it to mark a function at definition time to be 'self-executing' - in absence of opening parenthesis IN INVOCATION SOURCE to invoke without parameters or when assignment token is detected to take the right side as single argument (and comma-separated expressions as multiple positional parameters)? (..stepping out of the language defined perimeter is not my recommended policy for living out solution creativity, but sometimes you do what you gotta do and step out of the box...)
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.
Making sure that there is always a significant amout of RAM free is not a simple task...
Predictability at runtime of RAM usage is difficult and out-of-memory cpndition is a potential haphazard, especially with connected devices, such as a Web server. Malignant requests can mount a state of service denial...
Being able to contain - predict - at build time using resource planning the behavior of as many subsystemsas possible contributes to the robustness of the solution. It obviously comes with a price, in this case 50% of the resource: 1 / numberOfPages and numberOfPages >= 2. In other words, the more pages available, the more affordable it becomes. Unfortunately that is mostly defined by the design of the memory laoyut and limited placement options for the given firmware and saved code.
The time will come when interpreting code in ROM has to be implemented (interpreting directly, without paging-in)... a challenge to the existing, currently straight forward implementation, process and lfe cycle architecture...
Btw, having get and set properties' implemented would nicely support a transparent access to things -properties of 'objects' - in ROM.
How difficult is it to mark a function at definition time to be 'self-executing' - in absence of opening parenthesis IN INVOCATION SOURCE to invoke without parameters or when assignment token is detected to take the right side as single argument (and comma-separated expressions as multiple positional parameters)? (..stepping out of the language defined perimeter is not my recommended policy for living out solution creativity, but sometimes you do what you gotta do and step out of the box...)