Patent ID: 8745328

Claim:
A method for managing memory comprising: receiving, by an external host, metadata for one or more data blocks in a nonvolatile memory of a portable device, the metadata identifying an initial error correction code (ECC) algorithm for each of the data blocks; determining, by the external host, a bad data block in the nonvolatile memory of the portable device based on the received metadata, wherein the bad data block includes one or more errors, and wherein the bad data block comprises a first bad data block; modifying the received metadata to identify, for the bad data block, a subsequent ECC algorithm having a strength greater than a strength of the initial ECC algorithm; transmitting the modified metadata to the portable device, wherein the portable device is configured to, apply execute the subsequent ECC algorithm to correct the one or more errors in the bad data block; and determining a second bad data block based on an associated time stamp or erase count exceeding a specified threshold, wherein the metadata identifies the associated time stamp or the erase count.