Patent ID: 7613870

Claim:
A method for efficient memory usage, comprising: determining whether data retrieved from a first storage device is characterized as data that is primarily read, wherein determining whether data retrieved from the first storage device is characterized as data that is primarily read includes: monitoring for at least one of a processor access pattern to a memory, an attribute associated with a command and a memory address of the command; and identifying data retrieved from the first storage device as characterized as data that is primarily read based on the monitoring; if data retrieved from the first storage device is characterized as data that is primarily read: writing the retrieved data in a temporary storage device with short write latency; and writing the retrieved data in a high-density memory; receiving a request to write data to a memory address in the high-density memory; allocating one or more memory addresses of the temporary storage device equal to a minimum block size that may be written to the high-density memory; writing the data to a memory address in the one or more allocated memory addresses; reading data from memory addresses, which will remain unmodified, included in the block of the high-density memory to which data is to be written; storing data read from the unmodified memory addresses included in the block of the high-density memory to which data is to be written in the one or more allocated memory addresses of the temporary storage device; and writing data stored in the one or more allocated memory addresses of the temporary storage device to the high-density memory.