The Research and Implementation of a Memory Leak Detective Technology

Author
WangZuo
Advisor
ZhangJunWen
School
Beijing Jiaotong University
Major
Applied Computer Technology
Classification
TP311.11 Programming method
Degree
Master's thesis
Year
2008
Downloads
171
Citations
4

Request the full text

Abstract

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.

Table of contents

Acknowledgements 5-6 Chinese Abstract 6-7 ABSTRACT 7-10 1 Introduction 10-13 1.1 project background 10 1.2 research status 10-11 1.3 This paper focuses 11-12 1.4 The paper is organized 12-13 2 memory leak detection technology 13-31 2.1 memory leak related concepts 13-21 2.1.1 memory leak 13-14 2.1.2 Classification of memory leaks generation method 14-15 2.1.3 memory leak detection methods 15-21 2.2 memory leak detection and garbage collection mechanism 21-29 2.2.1 garbage collection mechanism 22-23 2.2.2 garbage collection process abstraction 23-24 2.2.3 garbage collection algorithm introduced 24-29 2.3 C language garbage collection 29-31 3 based on three -color marker pointer memory test algorithms 31-46 3.1 Cheney copying collector node 31-36 3.1.1 Three Color Marker Principle 31-32 3.1.2 Cheney algorithm 32-33 3.1.3 Case Study 33-36 3.2 TMPO algorithm 36-43 3.2.1 TMPO idea of ??the algorithm and frame design 37-40 3.2.2 TMPO algorithm execution process 40-43 3.3 TMPO algorithms and other garbage collection algorithms compare 43-46 3.3.1 Theoretical analysis 43-45 3.3.2 actual test 45-46 4 memory leak detection report generation 46-55 4.1 memory leak information output frame design 46-47 4.2 memory leak information output framework to achieve 47-55 5 Summary and Outlook 55-57 5.1 summarizes research 55-56 5.2 further work 56-57 References 57-59 Appendix 59-61 Author Biography 61-63 dissertation dataset 63

Related dissertations

  1. Asymmetric Dual-Space Collectors
  2. Research on Unit Test Methods of Special Transformer Acquisition Terminal Based on Embedded Linux
  3. Design and Implemention of Software Intermediate Layer
  4. Research on Memory Leak Detection of C/C++Code
    Wang ·Dalian University of Technology ·2012 ·Master's thesis
  5. The R/W Manner Research and Optimal Design of the Shingled-recording Hard Drivers
  6. Key Technique Research on Embedded System Virtual Machine
    WuZhiJun ·Ningbo University ·2012 ·Master's thesis
  7. Research on Some Energy-Aware Techniques of Flash Memory Storage System for Embedded Systems
    DuZuoHua ·Zhejiang University ·2007 ·Doctoral dissertation
  8. Research of the Secure Computing Based on Java USIM Card
  9. Proof-Carrying Garbage Collection
  10. The Adaptive Optimizations in Java Virtual Machine
    ZouQiong ·University of Science and Technology of China ·2008 ·Doctoral dissertation
  11. Research on the Key Technologies of Digital Television System
    HuBo ·Huazhong University of Science and Technology ·2007 ·Doctoral dissertation
  12. Research on Program Execution Model Based on Runtime
  13. Research on Static Analysis of Memory Errors in C Programs
  14. Research on Storage Management for Flash Memory
  15. Vehicle monitoring system performance improvement of key technology research
  16. The Design and Implementation of a Static Analysis System in Source Code
  17. Study on Nand Flash File System of the On-board Data Recorder
    MengJun ·Beijing Jiaotong University ·2008 ·Master's thesis
  18. Research of Dynamic Memory Management Method on Real-Time Embedded System
    LiZhiJun ·Chongqing University ·2007 ·Master's thesis
  19. Dynamic memory management fault test programming language model
    ZhangHong ·Zhengzhou University ·2006 ·Master's thesis
  20. Research and Realization of the Implementation of Mass Storage Device in Embedded System
    LuoYueZuo ·East China Normal University ·2004 ·Master's thesis