×

Method and apparatus for detecting memory leaks using expiration events and dependent pointers to indicate when a memory allocation should be de-allocated

  • US 5,689,707 A
  • Filed: 12/04/1995
  • Issued: 11/18/1997
  • Est. Priority Date: 12/04/1995
  • Status: Expired due to Fees
First Claim
Patent Images

1. 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:

  • allocating a block of computer memory for a function in said program requesting said block of computer memory, said function being a basic programming unit of said program;

    specifying said de-allocation information for said block of computer memory being allocated, said de-allocation information indicative of when said currently allocated blocks of computer memory should be de-allocated, wherein the step of specifying said de-allocation information for said block of computer memory being allocated includes specifying an expiration event for said block of computer memory being allocated, said expiration event being an occurrence indicative of when said block of computer memory should be de-allocated, and assigning a unique numerical values as said expiration event in said memory allocation table, said unique numerical value indicative of a type of said expiration event, said type of expiration event includes an expiration event where an expiration should never occur;

    storing said requesting file information and de-allocation information corresponding to said function requesting said block of computer memory in said memory allocation table using said memory management functions,querying said memory allocation table using said memory management functions for said currently allocated blocks of computer memory having de-allocation events thereby indicating corresponding said currently allocated blocks of computer memory should have been de-allocated.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×