Having the algorithm above should effectively do wear levelling (it's just going to work its way round all the flash pages, without thrashing one in particular). The only bad point really is the time taken to find a JsVar, as you're basically just searching through the Journal.
I thing some kind of 'index' right at the start would help with that though.
It's kind of hard to describe the algorithm. I guess the best option would be to create a 'fake' flash memory for the Linux build and then to play around with different approaches.
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.
Having the algorithm above should effectively do wear levelling (it's just going to work its way round all the flash pages, without thrashing one in particular). The only bad point really is the time taken to find a JsVar, as you're basically just searching through the Journal.
I thing some kind of 'index' right at the start would help with that though.
It's kind of hard to describe the algorithm. I guess the best option would be to create a 'fake' flash memory for the Linux build and then to play around with different approaches.