IP Library Granted Patent US 7,765,528
Granted Patent B2
US 7,765,528 · App. 11/232,330 · Granted Jul 27, 2010

Identifying sources of memory retention

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,765,528
App. No.
11/232,330
Granted
Jul 27, 2010
Kind
B2
Abstract

One embodiment relates to a method for identifying sources of memory retention in an executing application. A size of a set of objects is tracked over multiple periods. A period is determined to be a growth period if the size for the set of objects increases above a previous maximum size, and the number of growth periods is counted. The set of objects is flagged as having potential undesired object retention (a memory leak) if the number of growth periods is greater than a threshold number. Other embodiments are also disclosed.

Claims (39)

1. A method for identifying sources of memory retention in an executing application, the method comprising:

tracking a size for a set of objects over multiple time periods;

determining a period to be a growth period if the size for the set of objects increases above a previous maximum size, otherwise determining a period to be a non-growth period;

counting a number of growth periods within the multiple time periods;

flagging the set of objects if the number of growth periods is greater than a first threshold number of growth periods;

indicating a potential undesired object retention for the set of objects if the set of objects is flagged and the number of elapsed non-growth periods from the most recent growth period is less than or equal to a second threshold number, the second threshold number being a number of non-growth periods; and

locating a source of the memory retention by finding a cause of a resource consumption growth.

2. The method of claim 1 , further comprising limiting overhead to find the root cause by restricting a frequency at which said finding operation is performed for each identified set of objects.

3. The method of claim 2 , further comprising determining a context of the root cause after the set of objects is flagged as having unconstrained growth.

4. The method of claim 1 , further comprising determining a number of elapsed time periods from a most recent growth period.

5. The method of claim 1 , wherein tracking the size of the set of objects is performed using sampling.

6. The method of claim 5 , further comprising incrementing a counter when a new object is added to the set of objects by the application.

7. The method of claim 6 , further comprising determining what the time to track the size of the set of objects is when the counter reaches a multiple of a constant number.

8. The method of claim 1 , wherein the set of objects comprises objects aggregated by a collection class.

9. The method of claim 8 , further comprising declaration of a wrapper class which is a subclass of the collection class.

10. The method of claim 9 , wherein the wrapper class comprises additional fields including at least the number of growth periods, a maximum size observed, and a flag for indicating that the first threshold has been exceeded.

11. The method of claim 10 , wherein the additional fields further include a peak period identifier for determining if a number of elapsed periods from a peak period is less than or equal to a second threshold number.

12. The method of claim 1 , wherein the set of objects whose size is to be tracked comprises all objects of a particular type.

13. The method of claim 1 , wherein the set of objects comprises all objects reachable from a given object in the application.

14. The method of claim 1 , wherein the set of objects is specified by a user.

15. The method of claim 1 , wherein a length of each period is a fixed time period.

16. The method of claim 1 , wherein a length of each period is a variable time period in dependence on a configurable parameter.

17. The method of claim 16 , wherein the configurable parameter comprises an application load.

18. An apparatus configured with a processor for identifying sources of memory retention, the apparatus comprising:

processor-executable code configured to track a size for a set of objects over multiple periods;

processor-executable code configured to determine a period to be a growth period if the size for the set of objects increases above a previous maximum size, and otherwise indicating a period to be a non-growth period;

processor-executable code configured to count a number of growth periods over the multiple periods;

processor-executable code configured to flag the set of objects if the number of growth periods is greater than a first threshold number of growth periods;

processor-executable code configured to determine a number of elapsed non-growth periods from a most recent growth period; and

processor-executable code configured to indicate a potential memory leak in the set of objects if the set of objects is flagged and the number of elapsed non-growth periods from the most recent growth period is less than or equal to a second threshold number, the second threshold number being a number of non-growth periods;

processor-executable code to locate a source of the memory retention by finding a cause of a resource consumption growth.

19. A system configured with a processor for locating sources of memory retention, comprising:

means for observing a size for a set of objects over multiple periods;

means for designating a period as a growth period if the size of the set of objects increases above a previous maximum size, and otherwise designating a period as a non-growth period;

means for tracking a number of growth periods within the multiple time periods;

means for setting a flag corresponding to the set of objects if the number of growth periods is greater than a first threshold number of growth periods;

means for calculating a number of elapsed non-growth periods from a most recent growth period; and

means for reporting a potential memory leak in the set of objects if the set of objects is flagged and the number of elapsed non-growth periods from the most recent growth period is less than or equal to a second threshold number, the second threshold number being a number of non-growth periods; and

means for locating a source of the memory retention by finding a cause of a resource consumption growth.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 18, 2021
From: OT PATENT ESCROW, LLC
To: VALTRUS INNOVATIONS LIMITED
Reel/Frame 058897/0262 →
PATENT ASSIGNMENT, SECURITY INTEREST, AND LIEN AGREEMENT Recorded Jan 26, 2021
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP; HEWLETT PACKARD ENTERPRISE COMPANY
To: OT PATENT ESCROW, LLC
Reel/Frame 055269/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2015
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 037079/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 21, 2005
From: FINDEISEN, PIOTR; LI, YANHUA; COHA, JOSEPH A.; SEIDMAN, DAVID I.
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 017031/0037 →