Fixed size block writes require simple algorithms only. It gets a bit more nifty with variable sise block writes. Of course, you can also start with the anchor to find the last written block when each block includes (at the beginning) some type/length information. For any fast access though you would go for a binary-search-like algorithm, and with minimal information at the beginning of each page (page size a choice), information about page full and stradling information (information about begin in previous page of 'record' that stradles the pages) - 2 or more).
I do not see the need for skewing (ring buffer 'spiraling'), since it is not a rewrite. Even if you have to use page write, after the page is full, it is not written anymore. When reaching memory full, all pages would have about the sam amount of writes / wear (with fixed size block recordings).
If memory is read out with freeing space before full, information about ring buffer begin is required any and would have to be written somewhere. Using a bit on each page can avoid that. Freeing (w/ Erasing) would then have to happen on full with inactive, delete-able and active records.
I conclude that one can't get away with just writing application data. There is always some meta / managment data required to make it decently operable.
© Espruino, powered by microcosm.
Report a problem