Method and apparatus for detecting memory leaks using expiration events and dependent pointers to indicate when a memory allocation should be de-allocated
AssigneeNCR Corporation
InventorJeffrey M. Donnelly
Life of this patent
Estimating the term…
Loading patent…
AssigneeNCR Corporation
InventorJeffrey M. Donnelly
Estimating the term…
The invention utilizes expiration events and dependent pointers to indicate when the corresponding memory allocation should be de-allocated. Expiration events are occurrences that indicate corresponding memory allocations should be de-allocated prior to the occurrence of the event. Dependent pointers are pointers to currently allocated blocks of computer memory. These dependent pointers indicate that the corresponding computer memory allocation should be de-allocated prior to the de-allocation of the computer memory allocation referred to by the dependent pointer. Using memory management functions, the expiration events and dependent pointers are stored in a memory allocation table along with filenames and line numbers indicating where the request was made. At given points in the program, the memory allocation table is checked for memory leaks. Specifically, the memory allocation table is checked for currently allocated blocks of computer memory which have an expired expiration event that has occurred or a dependent pointer which points to a de-allocated memory allocation.
A method for detecting memory leaks in a program executing on a computer system using memory management functions, said memory management functions operative to query and maintain a memory allocation table for storing information regarding currently allocated blocks of computer memory in said computer system including corresponding requesting file information and de-allocation information, said method comprising the steps of:
An apparatus for detecting memory leaks in a program executing on a computer system having blocks of computer memory, wherein said program comprise at least one function, said apparatus comprising of:
Dependencies are inferred from the claim text.