Patent ID: 9218277
Filing Date: 2015-12-22
Classification: G06F

Abstract:
1. Method for operating a computer memory, the memory being organized to store data in a set of units of the memory, the method comprising: maintaining and updating a first identifier that identifies a unit that presently is a best candidate unit for reclaimation in view of a criteria other than a wear level, and maintaining and updating a second identifier that identifies a unit that presently is a best candidate unit selected for erasure in view of wear levels associated with blocks of the subset; determining a wear level of each of the units of the set and identifying a maximum wear level among the determined wear levels; receiving suggestion of a subset comprising one or more units for being selected for data erasure; determining whether a suggested unit of said subset is preferred over said unit identified by said second identifier in view of the criteria according to which the first identifier of the best candidate unit is identified, and responsive to a determining that the suggested unit of said subset is preferred over said unit identified by said second identifier: otherwise, if it is determined that the suggested unit of said subset is not preferred over said unit identified by said second identifier; or if said wear level of said suggested unit is not less than the maximum wear level, then determining whether the suggested unit is better than the best block in terms of the criteria according to the unit identified by said first identifier; and if the suggested unit is better over the best block identified by said first identifier, then updating said first identifier with the identification of said suggested unit, otherwise, if said suggested unit is not better than the best unit identified by said first identifier, and upon further determining more units to process, and that the second identifier is not at its initial value, otherwise, if determined that there are more units to process, and that the second identifier is at its initial value, then updating a second identifier that identifies a unit with the unit currently associated with said first identifier as the block for recycling; and causing for recycling said suggested unit identified by said second identifier in the presence of a wear-leveling feature, and incrementing a value of the maximum wear level; repeating for all unit of said subset, the wear level determining, the receiving, the preference determining, the responding by comparing, the incrementing, and the recycling.