Conventionally, a computing system typically includes a processor, a cache memory, and a main memory. Objects, such as data, are stored in the main memory. However, once an object is accessed by the processor, the object is placed in the cache memory so that the processor can readily act on the object if needed. This is because the processor generally can access the cache memory much faster than the main memory. Furthermore, the objects in the cache memory may change from time to time depending on which objects are accessed by the processor. Note that the cache memory is not used for long term storage, rather, the cache memory is used as a convenient temporary storage space for the processor.
To improve the efficiency of the computing system, attempts have been made to more efficiently utilize the cache memory. As part of this effort, some conventional computing systems use a bit in the header of each object to track accesses made to the respective object. This bit may be referred to as the “access bit.” Specifically, if an object has been accessed since the last time garbage collection and locality optimization are run, then this bit in the header of this object is set to indicate so. Objects with the access bits set are generally presumed to be in the current working set of processes or threads, and these objects may be retained in the cache memory longer.
Although the access bits in the headers of the objects provide a simple solution to improve the efficiency of the cache memory usage, however, the information provided by the access bits is very limited. As a result, the improvement to the efficiency of the cache memory usage relying on the access bits is also limited.