Method and computer programming product for detecting memory leaks
First Claim
1. A method for detecting memory leaks produced by a computer program running on a computer comprising,creating a first memory leak list that records memory allocations that were not de-allocated after a first run of the computer program, wherein the list records the position of each such memory allocation and its size;
- creating a second memory leak list that records memory allocations that were not de-allocated after the second run of the computer program, wherein the list records the position of each such memory allocation and its size;
creating a stored reference pattern list by identifying consecutive entries on the first and second memory leak lists that correspond to one another;
during a third run of the computer program using the stored reference pattern list to detect the portions of the computer program that created the memory leak;
wherein the stored reference pattern list records lengths of memory leaks together with their respective relative distances are entered, and in which entries are provided therebetween for memory allocations that did not result in a leak.
2 Assignments
0 Petitions
Accused Products
Abstract
The invention relates to a method for detecting memory leaks produced by a program running on a computer, wherein during a program run, for each allocation of a memory region at least one information item concerning the performed allocation is entered in an allocation list and a check is made as to whether the allocation list contains a stored reference pattern of information that is typical for one or more memory leaks, and after a stored reference pattern is found the program run is paused, or a memory leak thus detected is associated with the region of the running program whose processing resulted in the most recent entry in the allocation list. The invention further relates to a computer programming product which carries out the method when the computer program is executed on a computer.
-
Citations
7 Claims
-
1. A method for detecting memory leaks produced by a computer program running on a computer comprising,
creating a first memory leak list that records memory allocations that were not de-allocated after a first run of the computer program, wherein the list records the position of each such memory allocation and its size; -
creating a second memory leak list that records memory allocations that were not de-allocated after the second run of the computer program, wherein the list records the position of each such memory allocation and its size; creating a stored reference pattern list by identifying consecutive entries on the first and second memory leak lists that correspond to one another; during a third run of the computer program using the stored reference pattern list to detect the portions of the computer program that created the memory leak; wherein the stored reference pattern list records lengths of memory leaks together with their respective relative distances are entered, and in which entries are provided therebetween for memory allocations that did not result in a leak. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
Specification