1. A method for clearing memory, the method comprises the steps of: a) representing a group of memory locations by a representative value, wherein the memory includes a plurality of groups of memory locations; when the representative value is in a first state: b) storing a clear value in each corresponding memory location of a cache memory, wherein the corresponding memory locations of the cache memory correspond to the group of memory locations; c) setting a dirty bit for the corresponding memory locations of the cache memory; and d) when the representative value is in a second state, reading data from the group of memory locations to the corresponding memory locations of the cache memory.