6782462

System and Method for Tracking Memory Leaks

PublishedAugust 24, 2004
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
17 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method of detecting memory leaks in a computer system, said method comprising: receiving one or more memory allocation requests from operating system components; allocating memory in response to the allocation requests; identifying an available memory area within the allocated memory to store memory allocation data corresponding to the memory allocation requests, the memory allocation data including component identification data identifying the operating system components and memory allocation data corresponding to the memory allocation requests; storing the memory allocation data in the identified available memory area, the storing performed by a second operating system component; receiving memory de-allocation requests corresponding to one or more of the memory allocation requests; clearing the memory areas corresponding to the memory de-allocation requests; identifying one or more operating system components with memory leaks by reading the un-cleared memory areas; formatting the memory into a plurality of memory array slots, wherein each of the memory array slots is adapted to store data corresponding to a separate memory allocation request; and creating a plurality of fields within the memory array slots, at least one of the fields being selected from the group consisting of an operating system component name, a location, a size, and a pointer.

2

2. The method as described in claim 1 further comprising: generating a memory leak report based on the identification of operating system components with memory leaks.

3

3. The method as described in claim 2 further comprising: writing a memory leak report summary that includes the number of un-cleared memory allocations and a total amount of un-cleared memory corresponding to the un-cleared memory allocations.

4

4. The method as described in claim 1 further comprising: locating the stored memory allocation data using a hash table.

5

5. The method as described in claim 1 further comprising: receiving a tracking option; and setting a memory leak flag in response to the receiving, wherein the identifying, storing, and clearing are only performed in response to the memory leak flag being set.

6

6. The method as described in claim 1 wherein the operating system components are X-Windows components and wherein the allocating is performed by an X-Windows memory manager, the method further comprising: retrieving an memory leak environment variable requesting that memory leak detection be enabled; allocating the memory areas in response to receiving the memory leak environment variable; formatting the memory areas so that each memory area includes a component identifier field, a location field, a memory size field, and a memory address field; tracking the memory allocations and de-allocations using a memory leak tracing procedure running within an X-Windows component, the tracking including the identifying, the storing, and the clearing steps; writing component names corresponding to the X-Windows components into the component identifier fields; writing line numbers corresponding to program line numbers in the X-Windows components where memory allocation requests were made to the location fields; writing memory allocation sizes to the memory size fields; writing memory addresses to the memory address fields corresponding to each of the memory allocations; receiving a memory leak report request; reading the un-cleared memory areas corresponding to at least one of the memory allocation requests; writing data from the component identifier fields, the location fields, the memory size fields, and the memory address fields for each of the un-cleared memory areas to a memory leak report; and providing the memory leak report to an X-Windows user.

7

7. An information handling system comprising: one or more processors; a memory accessible by the processors; one or more nonvolatile storage devices accessible by the processors; a memory leak detection tool to detect memory leaks, the memory leak detection tool including: means for receiving one or more memory allocation requests from operating system components; means for allocating memory in response to the allocation requests; means for identifying an available memory area within the allocated memory to store memory allocation data corresponding to the memory allocation requests, the memory allocation data including component identification data identifying the operating system components and memory allocation data corresponding to the memory allocation requests; means for storing the memory allocation data in the identified available memory area, the storing performed by a second operating system component; means for receiving memory de-allocation requests corresponding to one or more of the memory allocation requests; means for clearing the memory areas corresponding to the memory de-allocation requests; means for identifying one or more operating system components with memory leaks by reading the un-cleared memory areas; means for formatting the memory into a plurality of memory array slots, wherein each of the memory array slots is adapted to store data corresponding to a separate memory allocation request; and means for creating a plurality of fields within the memory array slots, at least one of the fields being selected from the group consisting of an operating system component name, a location, a size, and a pointer.

8

8. The information handling system as described in claim 7 further comprising: means for generating a memory leak report based on the identification of operating system components with memory leaks.

9

9. The information handling system as described in claim 8 further comprising: means for writing a memory leak report summary that includes the number of un-cleared memory allocations and a total amount of un-cleared memory corresponding to the un-cleared memory allocations.

10

10. The information handling system as described in claim 7 further comprising: means for receiving a tracking option; and means for setting a memory leak flag in response to the receiving, wherein the identifying, storing, and clearing are only performed in response to the memory leak flag being set.

11

11. The information handling system as described in claim 7 wherein the operating system components are X-Windows components and wherein the means for allocating is performed by an X-Windows memory manager, the information handling system further comprising: means for retrieving an memory leak environment variable requesting that memory leak detection be enabled; means for allocating the memory areas in response to receiving the memory leak environment variable; means for formatting the memory areas so that each memory area includes a component identifier field, a location field, a memory size field, and a memory address field; means for tracking the memory allocations and de-allocations using a memory leak tracing procedure running within an X-Windows component, the tracking including the identifying, the storing, and the clearing steps; means for writing component names corresponding to the X-Windows components into the component identifier fields; means for writing line numbers corresponding to program line numbers in the X-Windows components where memory allocation requests were made to the location fields; means for writing memory allocation sizes to the memory size fields; means for writing memory addresses to the memory address fields corresponding to each of the memory allocations; means for receiving a memory leak report request; means for reading the un-cleared memory areas corresponding to at least one of the memory allocation requests; means for writing data from the component identifier fields, the location fields, the memory size fields, and the memory address fields for each of the un-cleared memory areas to a memory leak report; and means for providing the memory leak report to an X-Windows user.

12

12. A computer program product stored in a computer operable media for detecting memory leaks in a computer system, said computer program product comprising: means for receiving one or more memory allocation requests from operating system components; means for allocating memory in response to the allocation requests; means for identifying an available memory area within the allocated memory to store memory allocation data corresponding to the memory allocation requests, the memory allocation data including component identification data identifying the operating system components and memory allocation data corresponding to the memory allocation requests; means for storing the memory allocation data in the identified available memory area, the storing performed by a second operating system component; means for receiving memory de-allocation requests corresponding to one or more of the memory allocation requests; means for clearing the memory areas corresponding to the memory de-allocation requests; means for identifying one or more operating system components with memory leaks by reading the un-cleared memory areas; means for formatting the memory into a plurality of memory array slots, wherein each of the memory array slots is adapted to store data corresponding to a separate memory allocation request; and means for creating a plurality of fields within the memory array slots, at least one of the fields being selected from the group consisting of an operating system component name, a location, a size, and a pointer.

13

13. The computer program product as described in claim 12 further comprising: means for generating a memory leak report based on the identification of operating system components with memory leaks.

14

14. The computer program product as described in claim 13 further comprising: means for writing a memory leak report summary that includes the number of un-cleared memory allocations and a total amount of un-cleared memory corresponding to the un-cleared memory allocations.

15

15. The computer program product as described in claim 12 further comprising: means for locating the stored memory allocation data using a hash table.

16

16. The computer program product as described in claim 12 further comprising: means for receiving a tracking option; and means for setting a memory leak flag in response to the receiving, wherein the identifying, storing, and clearing are only performed in response to the memory leak flag being set.

17

17. The computer program product as described in claim 12 wherein the operating system components are X-Windows components and wherein the means for allocating is performed by an X-Windows memory manager, the computer program product further comprising: means for retrieving an memory leak environment variable requesting that memory leak detection be enabled; means for allocating the memory areas in response to receiving the memory leak environment variable; means for formatting the memory areas so that each memory area includes a component identifier field, a location field, a memory size field, and a memory address field; means for tracking the memory allocations and de-allocations using a memory leak tracing procedure running within an X-Windows component, the tracking including the identifying, the storing, and the clearing steps; means for writing component names corresponding to the X-Windows components into the component identifier fields; means for writing line numbers corresponding to program line numbers in the X-Windows components where memory allocation requests were made to the location fields; means for writing memory allocation sizes to the memory size fields; means for writing memory addresses to the memory address fields corresponding to each of the memory allocations; means for receiving a memory leak report request; means for reading the un-cleared memory areas corresponding to at least one of the memory allocation requests; means for writing data from the component identifier fields, the location fields, the memory size fields, and the memory address fields for each of the un-cleared memory areas to a memory leak report; and means for providing the memory leak report to an X-Windows user.

Patent Metadata

Filing Date

Unknown

Publication Date

August 24, 2004

Inventors

Neal Richard Marion
George Francis Ramsay III

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “SYSTEM AND METHOD FOR TRACKING MEMORY LEAKS” (6782462). https://patentable.app/patents/6782462

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.