IP Library Granted Patent US 7,627,621
Granted Patent B2
US 7,627,621 · App. 11/705,361 · Granted Dec 1, 2009

Method and system for minor garbage collection

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 7,627,621
App. No.
11/705,361
Granted
Dec 1, 2009
Kind
B2
Abstract

A method for minor garbage collection involves marking cards as clean, where the cards designate ranges of memory locations in a shared older generation, marking a card as dirty to obtain a dirty card when a reference field of an object is modified, where the object is allocated in one of multiple promotion areas, where the promotion area is used to promote objects to the shared older generation only for a single task, and where the card designates the reference field's memory location, examining the promotion areas and the cards to identify a region of the dirty card overlapping the promotion area, where promotion areas associated with other tasks are ignored, scanning the region of the dirty card overlapping the promotion area to identify roots of live young objects associated with the single task, and freeing a young object associated with the single task not identified as live during scanning.

Claims (55)

1. A method for minor garbage collection comprising:

marking a plurality of cards as clean, wherein the plurality of cards designates ranges of memory locations in a shared older generation;

marking a card selected from the plurality of cards as dirty to obtain a dirty card when a reference field of an object is modified,

wherein the object is allocated in a promotion area selected from a plurality of promotion areas,

wherein the promotion area is used to promote objects to the shared older generation only for a single task, and

wherein a memory location of the reference field is designated by the card;

examining the plurality of promotion areas and the plurality of cards to identify a region of the dirty card overlapping the promotion area, wherein promotion areas associated with other tasks are ignored;

scanning the region of the dirty card overlapping the promotion area to identify roots of live young objects associated with the single task; and

freeing a young object associated with the single task not identified as live during scanning.

2. The method of claim 1 , wherein the region of the dirty card overlapping the promotion area is the entire dirty card.

3. The method of claim 2 , further comprising:

marking the dirty card as clean when the promotion area is freed.

4. The method of claim 2 , further comprising:

marking the dirty card as clean when the dirty card does not contain any roots of live young objects.

5. The method of claim 1 , wherein examining the plurality of promotion areas and the plurality of cards comprises iterating through a task-specific promotion area list.

6. The method of claim 5 , further comprising:

sorting the task-specific promotion area list before examining the plurality of promotion areas and the plurality of cards.

7. The method of claim 1 , wherein a size of the promotion area is an integer multiple of a size of the card, and wherein a boundary of the promotion area is aligned with a boundary of the card.

8. A system comprising:

a young generation for storing young objects;

a shared older generation for storing promoted objects; and

a garbage collector configured to perform minor garbage collection by:

marking a plurality of cards as clean, wherein the plurality of cards designates ranges of memory locations in the shared older generation;

marking a card selected from the plurality of cards as dirty to obtain a dirty card when a reference field of an object is modified,

wherein the object is allocated in a promotion area selected from a plurality of promotion areas,

wherein the promotion area is used to promote objects to the shared older generation only for a single task, and

wherein a memory location of the reference field is designated by the card;

examining the plurality of promotion areas and the plurality of cards to identify a region of the dirty card overlapping the promotion area, wherein promotion areas associated with other tasks are ignored;

scanning the region of the dirty card overlapping the promotion area to identify roots of live young objects associated with the single task; and

freeing a young object associated with the single task not identified as live during scanning.

9. The system of claim 8 , wherein the region of the dirty card overlapping the promotion area is the entire dirty card.

10. The system of claim 9 , wherein the garbage collector is further configured to perform minor garbage collection by:

marking the dirty card as clean when the promotion area is freed.

11. The system of claim 9 , wherein the garbage collector is further configured to perform minor garbage collection by:

marking the dirty card as clean when the dirty card does not contain any roots of live young objects.

12. The system of claim 8 , wherein examining the plurality of promotion areas and the plurality of cards comprises iterating through a task-specific promotion area list.

13. The system of claim 12 , wherein the garbage collector is further configured to perform minor garbage collection by:

sorting the task-specific promotion area list before examining the plurality of promotion areas and the plurality of cards.

14. The system of claim 8 , wherein a size of the promotion area is an integer multiple of a size of the card, and wherein a boundary of the promotion area is aligned with a boundary of the card.

15. A computer readable medium comprising executable instructions for minor garbage collection by:

marking a plurality of cards as clean, wherein the plurality of cards designates ranges of memory locations in a shared older generation;

marking a card selected from the plurality of cards as dirty to obtain a dirty card when a reference field of an object is modified,

wherein the object is allocated in a promotion area selected from a plurality of promotion areas,

wherein the promotion area is used to promote objects to the shared older generation only for a single task, and

wherein a memory location of the reference field is designated by the card;

examining the plurality of promotion areas and the plurality of cards to identify a region of the dirty card-overlapping the promotion area, wherein promotion areas associated with other tasks are ignored;

scanning the region of the dirty card overlapping the promotion area to identify roots of live young objects associated with the single task; and

freeing a young object associated with the single task not identified as live during scanning.

16. The computer readable medium of claim 15 , wherein the region of the dirty card overlapping the promotion area is the entire dirty card.

17. The computer readable medium of claim 16 , further comprising executable instructions for minor garbage collection by:

marking the dirty card as clean when the promotion area is freed.

18. The computer readable medium of claim 16 , further comprising executable instructions for minor garbage collection by:

marking the dirty card as clean when the dirty card does not contain any roots of live young objects.

19. The computer readable medium of claim 15 , wherein examining the plurality of promotion areas and the plurality of cards comprises iterating through a task-specific promotion area list and sorting the task-specific promotion area list before examining the plurality of promotion areas and the plurality of cards.

20. The computer readable medium of claim 15 , wherein a size of the promotion area is an integer multiple of a size of the card, and wherein a boundary of the promotion area is aligned with a boundary of the card.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037305/0133 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 12, 2007
From: DAYNES, LAURENT PHILIPPE; SOMAN, SUNIL; CZAJKOWSKI, GRZEGORZ JAN
To: SUN MICROSYSTEMS, INC.
Reel/Frame 018998/0449 →