Concurrent remembered set scanning
AssigneeAmazon Technologies, Inc.
InventorsKelvin Don Nilsen, Bernd Joachim Wolfgang Mathiske, William Kemper
Life of this patent
Estimating the term…
Abstract
Systems and methods for performing garbage collection. A system updates a second data structure based at least in part on a first data structure, the first data structure comprising data from a previous garbage collection cycle of a garbage collection application and the second data structure comprising data from a current garbage collection cycle of the garbage collection application. The system allows an application to update the second data structure during the current garbage collection cycle.
Claims20
A computer-implemented method, comprising:
- setting a first card table to an inactive status denoted by a first identifier, the first card table comprising indications of memory regions that had references to objects stored in regions of memory classified as young generation in a previous garbage collection cycle;
- reading the first card table to determine a set of memory regions each referencing a respective object in the regions of memory classified as young generation;
- writing the determined set of memory regions to a second card table that is set to an active status denoted by a second identifier;
- and
- after writing the determined set of memory regions to the second card table:
- overwriting the first card table;
- setting the first card table to the active status and indicating the active status using the second identifier;
- and
- setting the second card table to the inactive status and indicating the inactive status using the first identifier.
A system, comprising:
- one or more processors;
- and
- memory that stores computer-executable instructions that are executable by the one or more processors to cause the system to:
- store a first data structure and a second data structure, wherein:
- the first data structure is set to an inactive status, the inactive status denoted by a first identifier, and stores results from a previous garbage collection cycle;
- and
- the second data structure is set to an active status, the active status denoted by a second identifier, and stores results from a current garbage collection cycle;
- update the second data structure based at least in part on the first data structure;
- and
- set the second data structure to the inactive status, by denoting the inactive status using the first identifier, for another garbage collection cycle.
A non-transitory computer-readable storage medium storing thereon executable instructions that, as a result of being executed by one or more processors of a computer system, cause the computer system to:
- update a second data structure based at least in part on a first data structure, the first data structure comprising data from a previous garbage collection cycle of a garbage collection application and having a status denoted by a first identifier, and the second data structure comprising data from a current garbage collection cycle of the garbage collection application and having a status denoted by a second identifier;
- allow an application to update the second data structure during the current garbage collection cycle;
- and
- responsive to the second data structure being updated,
- denote the status of the first data structure using the second identifier and denote the status of the second data structure using the first identifier.
Dependencies are inferred from the claim text.