Content area
Full text
Abstract
Memory leaks are hard to trace during the development stage - some of them will not show up until being deployed. This paper proposed a novel method based on virtualization technology, to detect memory leaks in applications running in a virtual machine by transparently tracking memory allocation and release. Virtualization based memory leak detection bears several advantages over other approaches. First of all, it doesn't require source code modification or recompilation. Secondly, the performance overhead is small. In addition, it also provides versatility without needing special hardware supports: not only user-mode application can be detected, but also the operating system kernel. Our current research explores part of aforementioned features. The experimental results show that, the mechanism has a limited performance overhead which is normally less than 5%, and the produced information can help programmer to trace the possible memory leaks efficiently.
Key Words: Memory Leak Detection; Virtualization; Virtual Machine; Virtual Machine Monitor
1. Introduction
Memory leaks are a common error in programming. It occurs when programs allocate some memory resources to use and after a certain time these memory resources are no longer used but left non-released. If the memory resource is virtual memory, the virtual memory space available to this process itself will be less and this progress can run out of virtual memory space; if the memory resource is physical memory, then the whole system can use less and less physical pages as long as the memory resources are kept leaking. Memory leak will lead to allocation failure of dynamic memory, resulting in suspension of services. In some severe cases memory leak can lead to collapse of the whole operating system due to resource depletion. For a process of short life time, memory leak is not a problem in general as the memory will be released at the termination of the process; but for the long-running processes, such as the running services on some servers, and for operating system, memory leak can cause serious consequences and result in the suspension of system. The memory leak is one major cause of computer security incidents all along.
Some programming languages like Java provide mechanism of garbage collection for memory resource management. Through this manner these programming languages rely on automatic memory management for...





