×

System and method for increasing cache efficiency through optimized data allocation

  • US 5,651,136 A
  • Filed: 06/06/1995
  • Issued: 07/22/1997
  • Est. Priority Date: 06/06/1995
  • Status: Expired due to Term
First Claim
Patent Images

1. In a computer system having a processor, a main memory store, and a cache memory that is divided into separate cache slots, each cache slot having multiple cache lines, a method for allocating cache lines within a cache slot for storing a data block of data block size and a corresponding header block of header block size that identifies the data block, the method comprising the machine-executed steps of:

  • responsive to a request from the processor to use a data block, allocating a cache slot having a slot size to store the requested data block and its corresponding header block, wherein the slot size is larger than the data block size plus the size of the header block;

    referencing a predetermined size criterion defining a relationship between the data block size and the cache slot size to determine if the predetermined size criterion is met by this allocation; and

    aligning the data block and the corresponding header block within the multiple cache lines in the cache slot according to whether the predetermined size criterion is met, by;

    (a) aligning the data block to the beginning of a first half of the cache slot and placing a corresponding header block that identifies the data block in a second half of the cache slot if the predetermined size criterion is met;

    or(b) aligning the header block to the beginning of the second half of the cache slot and placing the data block next to the header block so that part of the data block fits in the second half of the cache slot and the remainder of the data block fits in the first half of the cache slot if the predetermined size criterion is not met.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×