IP Library Granted Patent US 8,554,807
Granted Patent B2
US 8,554,807 · App. 13/431,973 · Granted Oct 8, 2013

Incremental class unloading in a region-based garbage collector

Inventors: Peter Wiebe Burka (Ottawa, CA); Jeffrey Michael Disher (Ottawa, CA); Daryl James Maier (Unionville, CA); Aleksandar Micic (Ottawa, CA); Ryan Andrew Sciampacone (Nepean, CA)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,554,807
App. No.
13/431,973
Granted
Oct 8, 2013
Kind
B2
Abstract

A technique for incrementally unloading classes using a region-based garbage collector is described. One aspect of such a technique includes maintaining a remembered set for a class set. The remembered set indicates whether instances of the class set are contained in one or more regions in memory, and in which regions the instances are contained. Upon performing an incremental garbage collection process for a subset of the regions in memory, the technique examines the remembered set to determine whether the class set includes instances in regions outside of the subset. If the remembered set indicates that the class set includes instances outside of the subset of regions, the technique identifies the class set as “live.” This will preclude unloading the class set from the subset of regions.

Claims (12)

1. A method for incrementally unloading classes using a regionbased garbage collector, the method comprising:

maintaining, by at least one processor, a remembered set for a class set, the remembered set indicating whether instances of the class set are contained in one or more regions in memory, and in which regions in memory the instances are contained, wherein the remembered set of each class set transitions between a plurality of representations based on an established policy, the representations comprising: (1) an “immediate” representation storing pointers to specific regions in memory where instances of the class set are contained; and (2) a “bit vector” representation comprising a bit for each region in memory that indicates whether at least one instance of the class set is contained in the corresponding region;

causing the remembered set to transition from the “immediate” representation to the “bit vector” representation upon determining that a number of regions that contain instances of the class set exceed a number of pointers that can be stored by the “immediate” representation;

upon performing an incremental garbage collection process for a subset of the regions in memory, examining the remembered set to determine whether the class set includes instances in regions outside of the subset; and

identifying the class set as “live” in the event the remembered set indicates that the class set includes instances in regions outside of the subset.

2. The method of claim 1 , wherein the class set is one of a set of classes associated with a class loader, a group of classes, and a single class.

3. The method of claim 1 , wherein the representations further comprise an “overflow” representation that assumes that all regions in memory contain at least one instance of the class set.

4. The method of claim 1 , wherein the representations further comprise an “empty” representation that indicated that no instance of the class set are contained in any of the regions in memory.

5. The method of claim 1 , further comprising, prior to performing the incremental garbage collection process for the subset, resetting the bits in the “bit vector” representation for the regions in the subset.

6. The method of claim 5 , further comprising, upon performing the incremental garbage collection process for the subset, setting the bits in the “bit vector” representation for those regions in the subset where instances of the class set are discovered.

7. The method of claim 6 , further comprising identifying the class set as “live” in the event any of the bits of the “bit vector” representation are set.

8. The method of claim 1 , further comprising, in the event the class set is determined not to be “live,” unloading the class set.

Continuity (2)
Continuation 13023447 · Feb 8, 2011
Related Publication 20120203804A1 · Aug 9, 2012