Author Login Editor-in-Chief Peer Review Editor Work Office Work

Computer Engineering ›› 2008, Vol. 34 ›› Issue (16): 159-161. doi: 10.3969/j.issn.1000-3428.2008.16.055

• Security Technology • Previous Articles     Next Articles

Dynamic Check Technology of Heap Memory Leak Based on Red-black Tree

GE Yao1, LI Xiao-feng1, KONG De-guang2   

  1. (1. Information Center, Hefei Institutes of Physical Science, Chinese Academy of Sciences, Hefei 230031;2. Department of Automation, University of Science & Technology of China, Hefei 230027)
  • Received:1900-01-01 Revised:1900-01-01 Online:2008-08-20 Published:2008-08-20

基于红黑树的堆内存泄漏动态检测技术

葛 瑶1,李晓风1,孔德光2   

  1. (1. 中国科学院合肥物质科学研究院信息中心,合肥 230031;2. 中国科学技术大学自动化系,合肥 230027)

Abstract: To cope with the problem of heap memory leak, this paper presents a dynamic memory leak check technology based on red-black tree. With the method of dynamically catch the allocated situation of heap memory caused by the operator of new and delete during the execution of the program, decide whether the heap memory leak occurs. The system is implemented based on red-black tree, to manage the allocated heap memory. It is proved by theory induction and experiment that it has higher efficiency and is well platform-independent and scalable.

Key words: heap memory leak, dynamic check, red-black tree

摘要: 设计与实现一个轻量级的堆内存泄漏检测工具,针对使用C++编码的开源代码,通过重载new, delete运算符,动态跟踪程序在执行过程中堆内存块的分配释放情况,在程序运行结束时给出内存泄露的检测结果。实现时采用红黑树管理所分配的堆内存,理论推导和实验表明其具有较高的效率。

关键词: 堆内存泄漏, 动态检测, 红黑树

CLC Number: