IP Library Granted Patent US 7,827,538
Granted Patent B2
US 7,827,538 · App. 11/458,709 · Granted Nov 2, 2010

Memory leak detection

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,827,538
App. No.
11/458,709
Granted
Nov 2, 2010
Kind
B2
Abstract

A memory leak detection scheme for use in a computer system (e.g., Java) by: finding an allocation site ( 410 ) which is responsible for allocating objects which accumulate in a memory heap ( 400 ); and monitoring memory activity related to the found allocation site to discover a memory leak related thereto. The technique can be entirely application independent and can be made fully automatic, running as a daemon process on a machine and detecting leakage in a number of client processes simultaneously.

Claims (28)

1. A memory leak detection system for memory leak detection in a computer system, comprising:

computer means for starting a computer system running a Java interface;

computer means for finding an allocation site wherein the allocation site is responsible for allocating objects which accumulate in a memory heap to form a found allocation site, responsive to computer means for starting the computer system running a Java interface; and

computer means for monitoring memory activity related to the found allocation site to discover a memory leak related thereto by detecting growth in heap size, responsive to starting the computer system running the Java interface, wherein the computer means for monitoring memory activity comprises computer means for detecting a growth in heap size following a start-up phase, and wherein the computer means for detecting a growth in heap size following a start-up phase comprises computer means for detecting a growth in size of a surrogate heap tracking a subset of objects existing in another heap, wherein the surrogate heap is comprised of at least one object ID and at least one allocation site ID that uniquely identifies the allocation site by an integer, wherein the allocation site comprises a method name in a class file, at least one line number in the class file, and at least one class file that called the method name.

2. The memory leak detection system of claim 1 wherein the computer system comprises a Java environment.

3. The memory leak detection system of claim 2 , wherein the Java interface is a Java Virtual Machine Profiling Interface.

4. The memory leak detection system of claim 2 , wherein the Java interface is a Java Virtual Machine Tool Interface.

5. The memory leak detection system of claim 2 , wherein the computer means for monitoring memory activity comprises computer means for inserting monitoring Java code in a classfile which allocates objects to track object allocation.

6. A computer implemented method for memory leak detection in a computer system, the computer implemented method comprising:

starting the computer system running a Java interface;

finding, by the computer system, an allocation site, wherein the allocation site is responsible for allocating objects which accumulate in a memory heap to form a found allocation site, responsive to starting the computer system running a Java interface; and

monitoring memory activity related to the found allocation site, by the computer system, to discover a memory leak related thereto by detecting growth in heap size, responsive to starting the computer system running the Java interface, wherein detecting growth in heap size comprises detecting a growth in size of a surrogate heap tracking a subset of objects existing in another heap, wherein the surrogate heap is comprised of at least one object ID and at least one allocation site ID that uniquely identifies the allocation site by an integer, wherein the allocation site comprises a method name in a class file, at least one line number in the class file, and at least one class file that called the method name.

7. The computer implemented method for memory leak detection of claim 6 , wherein monitoring memory activity comprises

setting a debugger breakpoint at the found allocation site;

identifying a point of the memory leak; and

adding the object of the allocation site to a collection.

8. The computer implemented method for memory leak detection of claim 6 , wherein the step of finding an allocation site comprises finding a subset of a set of found allocation sites, and the step of monitoring memory activity comprises monitoring memory activity at the subset of found allocation sites.

9. The computer implemented method for memory leak detection of claim 6 , wherein the computer system comprises a Java environment.

10. The computer implemented method for memory leak detection of claim 9 , wherein the Java interface is a Java Virtual Machine Profiling Interface.

11. The computer implemented method for memory leak detection of claim 9 , wherein the Java interface is a Java Virtual Machine Tool Interface.

12. The computer implemented method for memory leak detection of claim 9 , wherein monitoring memory activity comprises inserting monitoring Java code in a classfile, which allocates objects to track object allocation.

13. A computer implemented method for memory leak detection in a computer system, the computer implemented method comprising:

starting the computer system running a Java interface;

finding an allocation site wherein the allocation site is responsible for allocating objects which accumulate in a memory heap to form a found allocation site, responsive to starting the computer system running a Java interface; and

monitoring memory activity related to the found allocation site to discover a memory leak related thereto, wherein the computer means for monitoring memory activity comprises computer means for detecting a growth in heap size following a start-up phase, and wherein the computer means for detecting a growth in heap size following a start-up phase comprises computer means for detecting a growth in size of a surrogate heap tracking a subset of objects existing in another heap, wherein the surrogate heap is comprised of at least one object ID and at least one allocation site ID that uniquely identifies the allocation site by an integer, wherein the allocation site comprises a method name in a class file, at least one line number in the class file, and at least one class file that called the method name monitoring further comprises:

setting a debugger breakpoint at the found allocation site and

monitoring an object related thereto subsequently being added to a collection.

14. The computer implemented method for memory leak detection of claim 13 , wherein finding an allocation site comprises finding a subset of a set of found allocation sites, and wherein monitoring memory activity comprises monitoring memory activity at the subset of found allocation sites.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 13, 2015
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: LINKEDIN CORPORATION
Reel/Frame 035201/0479 →