Font Size: a A A

The Research And Implementation Of A Memory Leak Detective Technology

Posted on:2009-02-27Degree:MasterType:Thesis
Country:ChinaCandidate:H WangFull Text:PDF
GTID:2178360242989631Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Programmers may take advantage of C/C++ programming language to allocate or free dynamic memory but easily failed to release previously allocated memory block. The effect of memory leak is minor for the short-lived program. But it is vital to detect and remove the memory leak. Memory leak may consume a mass of memory resource, eventually cause the program to fail due to lack of memory. In order to enhance the performance of software and assure the reliability of software, it is very important to detect the memory leak in C/C++ programs.For better effect when detecting memory leak, an algorithm based on tricolor-marking collection algorithm is presented which does not copy memory elements, thereby avoiding some of the problems caused by the asynchronous motion of objects (for example, low percentage of memory utilization). This in-place detection scheme has approximately the same complexity as other non-moving garbage collectors, thus making it usable in a high-level language implementation where some pointers cannot be traced.Visual C++ provides built-in memory leak detection, but its capabilities are minimal at best. Here are some features we introduce in this artical, none of which exist in the built-in detector:It provides a complete stack trace for each leaked block, including source file and line number information when available. It provides complete data dumps (in hex and ASCII) of leaked blocks. It provides customizable level of detail in the memory leak report.It provides customizable level of detail in the memory leak report.
Keywords/Search Tags:Memory Leak, Garbage Collection, Tricolor-Marking
PDF Full Text Request
Related items