摘要
设计与实现一个轻量级的堆内存泄漏检测工具,针对使用C++编码的开源代码,通过重载new,delete运算符,动态跟踪程序在执行过程中堆内存块的分配释放情况,在程序运行结束时给出内存泄露的检测结果。实现时采用红黑树管理所分配的堆内存,理论推导和实验表明其具有较高的效率。
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.
出处
《计算机工程》
CAS
CSCD
北大核心
2008年第16期159-161,共3页
Computer Engineering
基金
国家"863"计划基金资助项目(2006AA01Z449)
关键词
堆内存泄漏
动态检测
红黑树
heap memory leak
dynamic check
red-black tree