Patent ID: 7512765

Claim:
A method of auditing memory in a system, the method comprising: receiving a memory request from an application, the memory request being a request for memory; populating a memory tag having a stack depth component and a traceback stack component, the traceback stack component containing a pointer to a traceback stack, the stack depth component defining a size of the traceback stack, and the traceback stack containing information from a program stack associated with the application, the memory tag also including an activity type component defining a type of activity involved in populating the memory tag; determining if a memory pool has enough free memory to satisfy the request for memory; allocating, from the memory pool, a memory allocation unit if the memory pool has enough free memory to satisfy the request for memory, the memory allocation unit including a data area and a footer, the data area defining an area to which the application may write data, and the footer bounding the data area with a special code; receiving a request to return the memory allocation unit; determining whether the header of the memory allocation unit is valid; and populating the activity type component with a deallocation failure flag upon determining that the memory allocation unit header is invalid.