<p>Briefly, in accordance with an embodiment of the invention, a method and apparatus to alter code in a memory is provided. The method may include selecting a first block from a plurality of unmapped blocks in a nonvolatile memory to add or delete code in the nonvolatile memory. The apparatus may include a control circuit to select a first block from a plurality of unmapped blocks in a nonvolatile memory based on a cycle count of the first block to add or delete code in the nonvolatile memory. Other embodiments are described and claimed.</p>