An erase count of a flash memory block which is lost, e.g., due to power
failure is updated or replaced by using known erase counts of other
blocks of the flash memory. A flash management algorithm assigns a new
erase count value instead of the lost one based on either a maximum
value, an average value or a value combining the maximum value of the
known erase counts and some tolerance value. The known values may be
obtained from wear leveling data or from a stored erase history.