US 11,741,004 B2
Colorless roots implementation in Z garbage collector
Erik Österlund, Västerhaninge (SE); Per Liden, Stockholm (SE); and Stefan Mats Rikard Karlsson, Nacka (SE)
Assigned to Oracle International Corporation, Redwood Shores, CA (US)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Jun. 3, 2021, as Appl. No. 17/303,634.
Claims priority of provisional application 63/190,617, filed on May 19, 2021.
Claims priority of provisional application 63/190,621, filed on May 19, 2021.
Claims priority of provisional application 63/190,625, filed on May 19, 2021.
Prior Publication US 2022/0374352 A1, Nov. 24, 2022
Int. Cl. G06F 12/02 (2006.01); G06F 5/01 (2006.01); G06F 11/10 (2006.01); G06F 16/11 (2019.01)
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
OG exemplary drawing
 
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.