Font Size: a A A

The Design And Implementation Of Static Memory Leak Detection Model

Posted on:2010-05-18Degree:MasterType:Thesis
Country:ChinaCandidate:P KeFull Text:PDF
GTID:2178360278966370Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
It is the most difficult issue to detect memory errors in software of C. As the C language has the advantage of flexibility and efficiency, from its born until now, it is the main programming language which has been widely used. C language allows users to control the use of memory resources directly, which is very important for high-performance or hign utilization of computer resources. But the flexible memory management may lead to memory leaks and other memory errors. In C programs memory leak is very danger, it is difficult to be observed. However, with the accumulation of failures, the program's performance will be lower, and finally it will lead to serious crash or unexpectedly quit. Therefore memory leak detection is crucial!First of all, this paper researches on the memory leak detection technology, and analyzes the methods of memory leak detection, including static testing, dynamic testing, and compare their advantages and disadvantages. Then the author built the static testing tools DTSC, realized its syntax analysis, lexical analysis, symbol table and control flow graph, base on these, the author added the interval analysis of each variable to improve the accuracy of the analysis. After that the author built up a static testing platform on basis of state machine with strong expansion. And then by studying and summarizing the C languge codes which will generate memory leak fault, design and implement memory leak mode for DTSC, and use it to test C programs. Finally, this paper compares the test results with foreign static testing tools, analyze the strengths and weaknesses of DTSC memory leak model, and gives suggestions to improve DTSC platform and memory leak mode.
Keywords/Search Tags:Memory leak, Static testing, Interval analysis, Defect mode, State machine
PDF Full Text Request
Related items