CPC G06F 12/0253 (2013.01) [G06F 5/01 (2013.01); G06F 11/1068 (2013.01); G06F 12/0238 (2013.01); G06F 12/0261 (2013.01); G06F 12/0269 (2013.01); G06F 12/0276 (2013.01); G06F 16/128 (2019.01); G06F 2212/702 (2013.01); G06F 2212/7207 (2013.01)] | 24 Claims |
1. One or more non-transitory machine-readable media storing instructions which, when executed by one or more processors, causes performance of operations comprising:
receiving a request, from a mutator thread, to load a first reference to a first object from a heap memory onto a call stack of the application thread;
responsive to receiving the request, retrieving the first reference from the heap memory, the first reference including (a) a first memory address in the heap memory at which the first object is stored during at least a first time period and (b) an indication of a first garbage collection state, of a plurality of garbage collection states, associated with the first reference;
wherein a respective garbage collection state, of the plurality of garbage collection states, indicates at least (a) a phase of the garbage collector when the first reference was written to the heap memory and (b) a garbage collection generation associated with the first reference;
executing a bitwise shift operation that (a) removes one or more bits representing the first garbage collection state and (b) generates a second reference from the first reference;
based on a particular bit, of the one or more bits, determining whether to perform a set of garbage collection operations on the first reference to bring the first reference to a good state; and
storing the second reference without any indication of any of the plurality of garbage collection states, to the call stack.
|