IP Library Granted Patent US 7,853,627
Granted Patent B2
US 7,853,627 · App. 11/725,918 · Granted Dec 14, 2010

Dense prefix generation for garbage collection

Assignee: Oracle America, Inc.
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,853,627
App. No.
11/725,918
Granted
Dec 14, 2010
Kind
B2
Abstract

A technique for establishing a dense prefix for a memory in a computer system. Memory is divided into a plurality of chunks. An efficiency factor is generated for each chunk in one or more chunks contained in the plurality of chunks. The efficiency factor may be based on an amount of memory to be reclaimed, an amount of memory to be scanned and an amount of memory to be copied relative to the chunk. A dense prefix is then established for the memory based on an efficiency factor associated with a chunk.

Claims (51)

1. A computer implemented method comprising:

dividing memory into a plurality of chunks;

generating an efficiency factor for each chunk in one or more chunks contained in the plurality of chunks, the efficiency factor based on an amount of memory to be reclaimed, an amount of memory to be scanned and an amount of memory to be copied relative to the chunk, wherein the efficiency factor is proportional to the amount of memory to be reclaimed, and inversely proportional to the memory to be scanned and the amount of memory to be copied; and

establishing a dense prefix for the memory at a chunk in the one or more chunks based on the efficiency factor generated for the chunk.

2. A method as defined in claim 1 wherein the efficiency factor is a maximum efficiency factor of all of the generated efficiency factors.

3. A method as defined in claim 1 wherein the memory is divided into equal-sized chunks.

4. A method as defined in claim 1 further comprising:

identifying a range of chunks in the plurality of chunks,

wherein the one or more chunks is contained in the range of chunks.

5. A method as defined in claim 4 wherein identifying a range of chunks further comprises:

identifying a maximum prefix that contains only live areas in the memory; and

identifying a minimum prefix that contains a predetermined amount of garbage objects,

wherein the range of chunks is between the identified maximum prefix and identified minimum prefix.

6. A method as defined in claim 1 wherein the amount of memory to be reclaimed includes an amount of garbage located in a heap after the chunk.

7. A method as defined in claim 1 wherein the amount of memory to be scanned includes an amount of live areas in a heap before the end of the chunk.

8. A method as defined in claim 1 wherein the amount of memory to be copied includes an amount of live areas in a heap after the chunk.

9. An apparatus comprising:

memory; and

a processor coupled to the memory, the processor configured to:

(a) divide the memory into a plurality of chunks;

(b) generate an efficiency factor for each chunk in one or more chunks contained in the plurality of chunks, the efficiency factor based on an amount of memory to be reclaimed, an amount of memory to be scanned and an amount of memory to be copied relative to the chunk, wherein the efficiency factor is proportional to the amount of memory to be reclaimed, and inversely proportional to the memory to be scanned and the amount of memory to be copied; and

(c) establishing a dense prefix for the memory at a chunk in the one or more chunks based on the efficiency factor generated for the chunk.

10. An apparatus as defined in claim 9 wherein the processor is further configured to:

identify a range of chunks in the plurality of chunks,

wherein the one or more chunks is contained in the range of chunks.

11. An apparatus as defined in claim 10 wherein the processor is further configured to:

identify a maximum prefix that contains only live areas in the memory; and

identify a minimum prefix that contains a predetermined amount of garbage objects,

wherein the range of chunks is between the identified maximum prefix and identified minimum prefix.

12. An apparatus as defined in claim 9 wherein the amount of memory to be reclaimed includes an amount of garbage located in a heap after the chunk.

13. An apparatus as defined in claim 9 wherein the amount of memory to be scanned includes an amount of live areas in a heap before the end of the chunk.

14. An apparatus as defined in claim 9 wherein the amount of memory to be copied includes an amount of live areas in a heap after the chunk.

15. An apparatus comprising:

means for dividing memory into a plurality of chunks;

means for generating an efficiency factor for each chunk in one or more chunks contained in the plurality of chunks, the efficiency factor based on an amount of memory to be reclaimed, an amount of memory to be scanned and an amount of memory to be copied relative to the chunk, wherein the efficiency factor is proportional to the amount of memory to be reclaimed, and inversely proportional to the memory to be scanned and the amount of memory to be copied; and

means for establishing a dense prefix for the memory at a chunk in the one or more chunks based on the efficiency factor generated for the chunk.

16. An apparatus as defined in claim 15 further comprising:

means for identifying a range of chunks in the plurality of chunks,

wherein the one or more chunks is contained in the range of chunks.

17. An apparatus as defined in claim 16 further comprising:

means for identifying a maximum prefix that contains only live areas in the memory; and

means for identifying a minimum prefix that contains a predetermined amount of garbage objects,

wherein the range of chunks is between the identified maximum prefix and identified minimum prefix.

18. A computer readable medium comprising computer-executable instructions for:

dividing memory into a plurality of chunks;

generating an efficiency factor for each chunk in one or more chunks contained in the plurality of chunks, the efficiency factor based on an amount of memory to be reclaimed, an amount of memory to be scanned and an amount of memory to be copied relative to the chunk, wherein the efficiency factor is proportional to the amount of memory to be reclaimed, and inversely proportional to the memory to be scanned and the amount of memory to be copied; and

establishing a dense prefix for the memory at a chunk in the one or more chunks based on the efficiency factor generated for the chunk.

19. A computer readable medium as defined in claim 18 wherein the efficiency factor is a maximum efficiency factor of all of the generated efficiency factors.

20. A computer readable medium as defined in claim 18 wherein the amount of memory to be reclaimed includes an amount of garbage located in a heap after the chunk.

21. A computer readable medium as defined in claim 18 wherein the amount of memory to be scanned includes an amount of live areas in a heap before the end of the chunk.

22. A computer readable medium as defined in claim 18 wherein the amount of memory to be copied includes an amount of live areas in a heap after the chunk.

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 037306/0556 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 20, 2007
From: PRINTEZIS, ANTONIOS; COOMES, JOHN W.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 019109/0833 →
Continuity (1)
Related Publication 20080235305A1 · Sep 25, 2008