I have an application that periodically updates a few values in flash memory. I understand that this will mark the previous values as ‘erased’ and write new flash objects as a form of write balancing, and only once the entire memory falls short of a write will the actual erasure occur.
Is there a way for me to detect how many bytes are ‘really’ free (i.e. not used nor ‘erased’)? More specifically, I’m trying to think of a way to tell whether I’m approaching the Garbage Collector process running.