Patent ID: 7954100

Claim:
A method for identifying thread-local objects in a multithreaded application, comprising: allocating an object in application memory for a thread in response to an allocation request from the thread; determining if the object is a thread-local object or a global object shareable by two or more threads of the application; in response to determining that the object is a thread-local object, tagging a reference to the object, said tagging comprising setting one or more low-order bits in the reference to a value indicating that the object is a thread-local object, wherein the reference is stored separately from the object and comprises data indicating a memory location where the object is stored, wherein the reference is usable to access the object; and in response to the allocation request, returning the tagged reference, but not the object itself, to the thread; wherein the tagged reference is usable by the thread to determine that the object is thread-local without examining the object itself.