Dynamic adjustment of garbage collection
First Claim
1. A method in a computer system for collecting garbage, the method comprising:
- determining an amount of memory that has been allocated since garbage was last collected;
when the determined amount exceeds a trigger point,determining whether a mark-and-sweep garbage collection technique or a copying garbage collection technique is currently selected;
when it is determined that the mark-and-sweep garbage collection technique is currently selected, performing mark-and-sweep garbage collection;
when it is determined that the copying garbage collection technique is currently selected, performing copying garbage collection;
calculating characteristics of the performed garbage collection;
adjusting the trigger point based on the calculated characteristics; and
selecting either the mark-and-sweep garbage collection technique or the copying garbage collection technique based on the calculated characteristics.
2 Assignments
0 Petitions
Accused Products
Abstract
Storage space within a heap may be subject to different types of garbage collection. A first type of garbage collection may be employed when there is a large amount of garbage in the heap, and the second type of garbage collection may be employed when there is a small amount of garbage in the heap. The computer system on which the heap is maintained may include intelligence for automatically deciding which of the garbage collection techniques to employ. The computer system may also automatically control when garbage collection is triggered by setting trigger points according to the amount of garbage collected in the most recent garbage collection. The trigger point may be decreased when there is a high amount of garbage collected, and the trigger point may be increased when there is a low amount of garbage collected.
178 Citations
48 Claims
-
1. A method in a computer system for collecting garbage, the method comprising:
-
determining an amount of memory that has been allocated since garbage was last collected; when the determined amount exceeds a trigger point, determining whether a mark-and-sweep garbage collection technique or a copying garbage collection technique is currently selected; when it is determined that the mark-and-sweep garbage collection technique is currently selected, performing mark-and-sweep garbage collection; when it is determined that the copying garbage collection technique is currently selected, performing copying garbage collection; calculating characteristics of the performed garbage collection; adjusting the trigger point based on the calculated characteristics; and selecting either the mark-and-sweep garbage collection technique or the copying garbage collection technique based on the calculated characteristics. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method in a computer system for collecting garbage within a heap, the method comprising:
-
determining a characteristic of the heap; based on the determined characteristic, selecting a first garbage collection technique or a second garbage collection technique; and performing the selected garbage collection technique on the heap wherein the first garbage collection technique is a mark-and sweep garbage collection and the second garbage collection technique is copying garbage collection technique. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A method in a computer system for determining when to perform garbage collection, the method comprising:
-
determining whether an amount of memory allocated since garbage collection was last performed exceeds a trigger point; and when it is determined that the amount of memory allocated since garbage collection was last performed exceeds the trigger point, performing garbage collection. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
-
-
30. A method in a computer system for collecting garbage, the method comprising:
-
determining whether a small amount of garbage or a large amount of garbage has been generated; when it is determined that a small amount of garbage has been generated, performing garbage collection without copying blocks that are not garbage; and when it is determined that a large amount of garbage has been generated, performing garbage collection with copying blocks that are not garbage. - View Dependent Claims (31, 32, 33)
-
-
34. A computer system for performing garbage collection, comprising:
-
a heap including allocated blocks of memory that are accessible and allocated blocks of memory that are inaccessible; and a memory manager with dynamically adjusting garbage collection for allocating block of memory of the heap and for determining when to perform garbage collection on the heap based on the amount of memory that has been allocated since garbage collection was last performed. - View Dependent Claims (35, 36)
-
-
37. A computer system for performing garbage collection, comprising:
-
a heap including allocated blocks of memory that are accessible and allocated blocks of memory that are inaccessible; and a memory manager with dynamically adjusting garbage collection for allocating block of memory of the heap, for determining when to perform garbage collection on the heap, and for selecting a garbage collection technique based on the allocated blocks of memory that are inaccessible. - View Dependent Claims (38, 39)
-
-
40. A computer-readable medium containing instructions for causing a computer system to determine when to perform garbage collection, by:
-
determining whether an amount of memory allocated since garbage collection was last performed exceeds a dynamically adjusted trigger point; and when it is determined that the amount of memory allocated since garbage collection was last performed exceeds the dynamically adjusted trigger point, performing garbage collection. - View Dependent Claims (41, 42, 43, 44)
-
-
45. A computer-readable medium containing instructions for causing a computer system to collect garbage, by:
-
determining a characteristic of a previous garbage collection; based on the determined characteristic, selecting a first garbage collection technique or a second garbage collection technique; and performing the selected garbage collection technique wherein the first garbage collection technique is a mark-and-sweep garbage collection technique and the second garbage collection technique is a copying garbage collection technique. - View Dependent Claims (46, 47, 48)
-
Specification