摘要
动态内存分配为C/C++语言编程人员提供了极大的灵活性,但同时也带来了一个潜在的严重问题——内存泄露。与桌面系统相比,嵌入式系统处理能力弱、内存空间小、运行时间长,如果在程序运行期间发生内存泄露,将导致系统崩溃,造成不可预料的后果,因此需要在开发调试阶段尽早检测出造成内存泄露的代码。提出了一种基于动态检测技术和程序插装技术的嵌入式软件内存泄露分布式检测方法。该方法的实现思想是当程序在目标机运行时,插装代码自动截获内存操作函数,收集内存操作相关信息并把收集到的信息发送到服务器端处理,实现了嵌入式系统内存泄露的准确检测。实验结果证明,由于采用分布式技术进行信息处理,内存泄露检测效率得到了很大的提升。
Dynamic memory assignment brings a great deal of flexibility for the C/C++ programmers, but this poses a potentially serious problem-memory leak. Compared with desktop systems, embedded systems have weak processing capability, small mem- ory space, long running time. If memory leak occurs during the execution of a program, it results in unexpected consequences. Therefore, it is necessary to find the code which causes a memory leak as early as possible. In this paper, a distributed memory leak detection method for embedded software is presented which is based on dynamic detection techniques and program instru- mentation technology. The main idea of this method is that when the program is running on the target machine, the instrumenta- tion code automatically intercepts memory operation functions, collects memory operation information and sends the informa- tion to the server. The experimental results show that the performance of memory leak detection has been greatly improved through the use of distributed processing technology.
出处
《计算机工程与应用》
CSCD
2013年第14期56-59,65,共5页
Computer Engineering and Applications
关键词
嵌入式软件
内存泄露检测
动态插装
动态检测
分布式检测
embedded software
memory leak detection
dynamic instrumentation
dynamic detection
distributed detection