Patent ID: 7761486

Claim:
A method for managing objects in a memory-management system which supports both address-referenced objects and identifier-referenced objects, the method comprising: receiving a request to access an object; determining whether the object is an address-referenced object or an identifier-referenced object by determining an organization of a reference object that is used to access the object, wherein the object is the address-referenced object if the object is accessed using a reference object that contains an address of the object in memory; wherein the object is the identifier-referenced object if the object is accessed using a reference object that contains an object identifier (OID) that is used to look up an address of the object in memory in a corresponding entry in an object table; and wherein the determining whether the object is the address-referenced object or the identifier-referenced object involves checking an indicator in the reference object that contains the OID, wherein the indicator is encoded in the address of the address-referenced object, or is encoded in the OID of the identifier-referenced object; if the object is the address-referenced object, accessing the object using the address contained in the reference object, wherein when the address-referenced object is in a thread-local heap (TLH) and is referenced by the identifier-referenced object, converting the address-referenced object into an identifier-referenced object; and relocating the converted identifier-referenced object from the TLH to a shared-memory space; and if the object is the identifier-referenced object, accessing the object by using the OID contained in the reference object to look up the address for the object in the corresponding entry in the object table, and then using the address to access the object.