摘要 |
A method and apparatus are provided for locating a object based on a reference to the object. An application determines whether the reference has previously been used to locate the object. If the reference has previously been used to locate the object, then a data structure referred to as a "tombstone" that has been associated with the object is located based on a first virtual memory address that is stored in the reference. Once the tombstone has been located, a first pseudo-timestamp that is stored in the reference is compared to a second pseudo-timestamp that is stored in the tombstone. If the first pseudo-timestamp matches the second pseudo-timestamp, then the object is located based on a second virtual memory address that is stored in the tombstone. If the first pseudo-timestamp does not match the second pseudo-timestamp or if the reference has not been previously used to locate the object, then the object is located based on the identifier stored in the reference. During the process of locating the object based on the object identifier, the virtual address of the tombstone associated with the object is stored in the reference, and the pseudo-timestamp stored in the tombstone is stored in the reference. When tombstones are reused, the pseudo-timestamp within the tombstone is incremented.
|