Patent ID: 8437189

Claim:
A method comprising: partitioning a NAND flash memory into a plurality of retention regions including a first retention region and a second retention region, wherein the second retention region has a longer data retention requirement than the first retention region; storing data in a memory block of the first retention region; determining whether the data stored in the memory block of the first retention region needs to be refreshed; and in response to determining that the data stored in the memory block of the first retention region needs to be refreshed, performing a refresh operation on the data stored in the memory block of the first retention region, wherein performing the refresh operation on the data stored in the memory block of the first retention region comprises (i) if the memory block of the first retention region has endured a predetermined number of erase/write cycles, relocating the data from the memory block of the first retention region to a memory block of the second retention region so that the data relocated to the memory block of the second retention region can be stored in accordance with the longer data retention requirement associated with the second retention region, and (ii) if the first memory block has endured less than the predetermined number of erase/write cycles, refreshing the data in the memory block of the first retention region.