US 12,487,924 B2
Concurrent lazy reference counting in an old garbage collection generation
Erik Österlund, Vasterhaninge (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 Jan. 2, 2024, as Appl. No. 18/401,982.
Prior Publication US 2025/0217285 A1, Jul. 3, 2025
Int. Cl. G06F 12/02 (2006.01); G06F 9/455 (2018.01)
CPC G06F 12/0276 (2013.01) [G06F 9/45558 (2013.01); G06F 2009/45583 (2013.01)] 20 Claims
OG exemplary drawing
 
1. One or more non-transitory computer-readable media storing instructions which, when executed by one or more hardware processors, cause performance of operations comprising:
encountering, by a mutator thread during a first garbage collection epoch, a first instruction to write a first value to a field;
responsive to encountering the first instruction to write the first value to the field: entering a slow-path write barrier;
performing, by the slow-path write barrier, a first one or more reference counting operations with respect to the field;
encountering, by the mutator thread during the first garbage collection epoch and subsequent to encountering the first instruction to write the first value to the field, a second instruction to write a second value to the field;
responsive to encountering the second instruction to write the second value to the field: entering a fast-path write barrier;
wherein the fast-path write barrier does not perform any reference counting operations with respect to the field.