• process.memory().free shows the amount of memory available in blocks, which are 16 bytes each - so you actually have 16k or more free. But maybe you need to have less than that amount in flash for it to be able to successfully compact.

    Either way this looks like a potential problem. I think Storage assumes that if there's a blank page then that's the end of the written Storage, which causes a problem when you go to erase a big file. I think I'll have to put a bit of work into trying to figure out how to tweak it.

  • I think I'll have to put a bit of work into trying to figure out how to tweak it.

    That's cool, no rush. I'll continue with the eraseAll workaround for now :-)

    I am just glad I was able to narrow it down to be easily reproducible.

About

Avatar for Gordon @Gordon started