IP Library Granted Patent US 7,500,079
Granted Patent B2
US 7,500,079 · App. 11/496,109 · Granted Mar 3, 2009

Detection of memory leaks

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,500,079
App. No.
11/496,109
Granted
Mar 3, 2009
Kind
B2
Abstract

Embodiments are configured to manage memory, including detecting one or more memory leaks. The various embodiments are configured to detect memory leaks and/or associated data without adding extra space or overhead for each associated memory allocation as compared with current implementations. In an embodiment, memory is managed including the detection a memory leak by using a fixed memory overhead, such as a fixed block or buffer of N pointers, instead of adding extra space per memory allocation. The contents of the fixed block can be altered and used to detect when memory has been allocated but not freed based on an analysis of a polynomial associated with one or more allocation and free operations. The polynomial can be solved to determine leaked pointers under certain conditions.

Claims (25)

1. A system for managing memory comprising:

a tracking block of memory, wherein a number of tracking pointers are associated with the tracking block of memory;

a memory marking component to mark at least one outstanding pointer associated with the tracking block of memory; and,

a memory checking component to track at least one of a memory allocation operation and a memory free operation using the number of tracking pointers, wherein the memory checking component is to use information provided by the memory marking component and the number of tracking pointers to detect at least one memory leak, wherein the memory checking component is further configured to construct a polynomial based at least in part on the number of tracking pointers and the at least one outstanding pointer to detect the at least one memory leak.

2. The system of claim 1 , wherein the memory checking component is further configured to solve the polynomial based to detect the at least one memory leak.

3. The system of claim 1 , wherein the memory checking component is further configured to construct a polynomial based at least in part on a solution to a system of linear equations associated with the number of tracking pointers and the at least one outstanding pointer.

4. The system of claim 1 , wherein each tracking pointer comprises a Galois Extension Field.

5. The system of claim 1 , the tracking block further comprising a contiguous set of values and an allocated and freed pointer each comprise a number; and,

wherein the memory checking component is further configured to add successive odd powers of the number to a first set of values in the tracking block, and add successive negative odd powers of the number to remaining values in the tracking block.

6. A method of managing memory comprising:

marking at least one outstanding pointer associated with a tracking block of memory having a number of tracking pointers;

tracking at least one of a memory allocation operation and a memory free operation using the number of tracking pointers;

establishing a relationship to identify a memory leak, wherein the relationship is based at least in part on a solution to a system of equations; and,

identifying the memory leak by using information provided by the at least one outstanding pointer and the number of tracking pointers.

7. The method of claim 6 , further comprising constructing a polynomial based at least in part on the number of tracking pointers and the at least one outstanding pointer to identify the at least one memory leak.

8. The method of claim 7 , further comprising constructing the polynomial based at least in part on a solution to a system of linear equations associated with the number of tracking pointers and the at least one outstanding pointer.

9. The method of claim 7 , further comprising solving the polynomial to identify the at least one memory leak.

10. The method of claim 6 , further comprising adding successive odd powers of a number to a first set of values in the tracking block, and adding successive negative odd powers of the number to remaining values in the tracking block.

11. The method of claim 6 , further comprising representing the tracking pointers and the at least one outstanding pointer with a Galois Extension Field.

12. A computer readable medium including executable instructions which, when executed, manage memory by:

identifying at least one outstanding pointer associated with a number of tracking pointers;

tracking a memory operation using the number of tracking pointers;

establishing a relationship to identify a memory leak, wherein the relationship is based at least in part on a solution to a system of equations associated with the outstanding pointer and the number of tracking pointers; and,

detecting the memory leak by using information provided by the at least one outstanding pointer and the number of tracking pointers.

13. The computer-readable medium of claim 12 , wherein the instructions, when executed, manage memory by constructing a polynomial based at least in part on the solution to the system of equations.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034542/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE SPELLING OF THE FIRST NAME OF CONVEYING PARTY. PREVIOUSLY RECORDED ON REEL 019348, FRAME 0384. Recorded Jun 1, 2007
From: BECKER, ANDREW JAMES
To: MICROSOFT CORPORATION
Reel/Frame 019372/0812 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 24, 2007
From: BECKER, ANDRES JAMES
To: MICROSOFT CORPORATION
Reel/Frame 019348/0384 →