Patent ID: 8479080

Claim:
A method for data storage, comprising: in a memory that includes multiple memory blocks, specifying at a first time a first over-provisioning overhead, and storing data in the memory while retaining in the memory blocks memory areas, which do not hold valid data and whose aggregate size is at least commensurate in size with the specified first over-provisioning overhead; compacting portions of the data from one or more previously-programmed memory blocks containing one or more of the retained memory areas; and at a second time subsequent to the first time, specifying a second over-provisioning overhead that is different from the first over-provisioning overhead, and continuing to store the data and compact the data portions while complying with the second overprovisioning overhead; wherein storing the data at the first time comprises encoding the data with an Error Correction Code (ECC) having a given redundancy level and storing the encoded data, and wherein specifying the second over-provisioning overhead comprises modifying the given redundancy level of the ECC.