IP Library › Granted Patent US 8,825,721
Granted Patent B2
US 8,825,721 · App. 13/251,974 · Granted Sep 2, 2014

Time-based object aging for generational garbage collectors

Inventors: Charlie Hunt (Libertyville, IL); Antonios Printezis (Burlington, MA); Staffan Friberg (Hagersten, SE)
Assignee: Oracle International Corporation
G06F12/0276
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,825,721
App. No.
13/251,974
Granted
Sep 2, 2014
Kind
B2
Abstract

System and Methods for time based object aging for generational garbage collectors are provided. Time data is received from a user identifying the amount of time an object should survive in a generation defined in a heap. Generational garbage collection is performed, and objects are promoted from one generation to the next oldest generation based on the time data received.

Claims (46)

1. A method for time-based object aging garbage collection comprising:

receiving, using at least one processor, a time tenuring threshold specifying an amount of time a plurality of objects survive in a memory;

receiving, using the at least one processor, first time data indicating an occurrence of a first garbage collection;

receiving, using the at least one processor, second time data for each object of the plurality of objects, the second time data comprising a time stamp specifying when a particular object of the plurality of objects was allocated in the memory;

calculating, using the at least one processor, an elapsed time value for each object of the plurality of objects by determining a first elapsed time between the first time data and the corresponding time stamp;

promoting, within the memory, at least one object of the plurality of objects when the elapsed time value meets the time tenuring threshold; and

when the elapsed time value fails to meet the time tenuring threshold:

retaining the at least one object at a current location within the memory; and

incrementing an object age field based on a second elapsed time between the first time data and a second garbage collection, the object age field corresponding to the at least one object.

2. The method of claim 1 , wherein the first time data includes a start time of the first garbage collection.

3. The method of claim 1 , wherein the memory includes a heap arranged with at least a first generation and a second generation, and wherein promoting the at least one object of the plurality of objects comprises copying the at least one object from the first generation to the second generation when the elapsed time value meets the time tenuring threshold.

4. The method of claim 3 , wherein the elapsed time value meets the time tenuring threshold when the elapsed time value is at least equal to the time tenuring threshold.

5. The method of claim 1 , wherein the time tenuring threshold is defined in milliseconds.

6. The method of claim 1 further comprising receiving, at the at least one processor, second time data from each object of the plurality of objects.

7. A system for time-based object aging generational garbage collection comprising:

at least one processor;

a memory in operable communication with the at least one processor; and

a time based object aging generational garbage collection application comprising modules executable by the processor, the modules comprising:

a receiving module to:

receive a time tenuring threshold specifying a time a plurality of objects survive in a heap in a memory;

receive first time data indicating the occurrence of a first garbage collection;

receive second time data for each object of the plurality of objects, the second time data comprising a time stamp specifying when a particular object of the plurality of objects was allocated in the memory;

a calculation module to calculate an elapsed time value for each object of the plurality of objects by determining a first elapsed time between the first time data and the corresponding time stamp; and

a promotion module to:

promote at least one object of the plurality of objects when the elapsed time value meets the time tenuring threshold and

when the elapsed time value fails to meet the time tenuring threshold:

retain the at least one object at a current location within the memory; and increment an object age field based on a second elapsed time between the first time data and a second garbage collection, the object age field corresponding to the at least one object.

8. The system of claim 7 , wherein the first time data is a time stamp specifying a start time of the first garbage collection.

9. The system of claim 7 , wherein the memory includes a heap arranged with at least a first generation and a second generation, and wherein the promotion module is further configured to promote the at least one object of the plurality of objects by copying the at least one object from the first generation to the second generation when the elapsed time value meets the time tenuring threshold.

10. The system of claim 7 , wherein the elapsed time value meets the time tenuring threshold when the elapsed time value is at least equal to the time tenuring threshold.

11. The system of claim 7 , wherein the receiving module is further configured to receive second time data from each object of the plurality of objects.

12. A non-transitory computer-readable medium encoded with time-based object aging generational garbage collection application comprising modules executable by a processor, the modules comprising:

a receiving module to:

receive a time tenuring threshold specifying the amount of time a plurality of objects survive in a heap in a memory;

receive first time data indicating the occurrence of a garbage collection; and

receive second time data for each object of the plurality of objects, the second time data comprising a time stamp specifying when a particular object of the plurality of objects was allocated in the memory;

a calculation module to:

calculate an elapsed time value for each object of the plurality of objects by determining a first elapsed time between the first time data and the corresponding time stamp; and

a promotion module to:

promote at least one object of the plurality of objects when the elapsed time value meets the time tenuring threshold and

when the elapsed time value fails to meet the time tenuring threshold:

retain the at least one object at a current location within the memory; and

increment an object age field based on a second elapsed time between the first time data and a second garbage collection, the object age field corresponding to the at least one object.

13. The non-transitory computer-readable medium of claim 12 , wherein the time data is a time stamp specifying a start time of the first garbage collection.

14. The non-transitory computer-readable medium of claim 12 , wherein the memory includes a heap arranged with at least a first generation and a second generation, and wherein the promotion module is further configured to promote the at least one object of the plurality of objects by copying the at least one object from the first generation to the second generation when the elapsed time value meets the time tenuring threshold.

15. The non-transitory computer-readable medium of claim 12 , wherein the elapsed time value meets the time tenuring threshold when the elapsed time value is at least equal to the time tenuring threshold.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 3, 2011
From: PRINTEZIS, ANTONIOS; HUNT, CHARLES J.; FRIBERG, STAFFAN
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 027008/0166 →
Continuity (1)
Related Publication 20130086132A1 · Apr 4, 2013