Patent ID: 7434206

Claim:
A method for identifying a source of memory leak in a program, comprising: while the program is running obtaining information related to memory allocation of objects; obtaining information related to memory de-allocation of the objects; providing information related to the source of the memory leak based on one input type related to allocation and de-allocation of objects or a combination of input types related to allocation and de-allocation of objects, said input types comprising: first difference in ratios of object allocation and de-allocation for a class; second difference between a number of allocations and a number of de-allocations of an object; a change in the first difference over time during execution of the program; a change in the second difference over time during execution of the program; a change in the first difference after a transaction of the program is executed; a change in the second difference after a transaction of the program is executed; a change in a heap size used by the program during its execution; and similarity in the number of allocations of the object and a leak rate; assigning a probability level to an identified source of memory leak, wherein the probability level is determined by particular input types related to allocation and de-allocation of objects, said particular input types contained in a set of input types, related to allocation and de-allocation of objects, wherein the step of obtaining the information related to memory allocation is performed in one or a combination of adding additional code to a class file that causes the information to be provided when the class file is being executed; and requesting an interface to provide the information.