Patent ID: 7747812

Claim:
A method for manipulating state machine data storage in a small memory space, wherein the data may include both active and inactive data, and whereby inactive data is removed to make room for new active data while minimizing a number of erase cycles, the method comprising: configuring a memory device to comprise a first memory sector having a primary memory sector correspondence, a second memory sector having an alternate memory sector correspondence, and a third memory sector having a free memory sector correspondence; receiving new active data for storage; determining whether the new active data will fit into either of the primary and alternative memory sectors; if the step of determining determines that the new active data will not fit in either of the primary or alternative memory sectors, then performing the following steps (a)-(d); (a) copying a portion of said primary memory sector to said free memory sector, said portion including active data; (b) writing the new active data to the free memory sector; (c) erasing said primary memory sector; and (d) updating the correspondence of each individual one of said first memory sector, said second memory sector, and said third memory sector.