One aspect of the invention provides a novel scheme to preserve the
failure state of a memory location. According to one embodiment, the data
is read from a memory location in a read-destructive memory device. If
the data is found to be valid (uncorrupted) it is written back to the
memory location from where it was read in order to preserve it. If the
data is found to be invalid (corrupted) then a failure codeword is
written in the memory location to indicate a failure of the memory
location. The failure codeword may be preselected or dynamically
calculated so that it has a mathematical distance greater than all
correctable data patterns.