Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Memory leak detection method

A technology of memory leaks and detection methods, which is applied in software testing/debugging, hardware monitoring, etc., and can solve problems such as inability to stimulate problems, limited code, etc.

Inactive Publication Date: 2010-08-25
PEKING UNIV
View PDF2 Cites 38 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Dynamic detection methods are limited by the test program, because the code coverage of the test program is very limited and cannot stimulate all potential problems

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Memory leak detection method
  • Memory leak detection method
  • Memory leak detection method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0105] The following is a specific embodiment of the present invention, which is implemented based on the open source full virtualization virtual machine manager KVM-84. KVM is a virtual machine manager implemented based on GNU / Linux and runs in the operating system as a module. The virtual machine is represented as a qemu process in the operating system. Through the interaction with the KVM module, the process realizes processor virtualization, memory virtualization, and virtualization of some hardware; virtualization of other hardware devices such as network cards and external memory, Implemented by qemu. Because KVM is a module inside the operating system, its debugging and operation are very convenient. It can be updated through dynamic loading and unloading of modules. This is something that xen cannot provide. Every modification on it requires restarting the hardware.

[0106] In this experiment, the operating system used by the virtual machine is the relatively mainstr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a memory leak detection method, and belongs to the technical field of virtualization. The method of the invention comprises the following steps that: 1) a virtual machine manager acquires addresses of an application function and a release function of a memory resource so as to acquire the allocated dynamic memory information; 2) calculating all the memory monitoring units crossed by a dynamic memory according to the start address and length of the dynamic memory; 3) a mapping relationship from the virtual address of the memory monitoring unit to the address of the machine is deleted from a shadow page table; 4) the virtual machine manager monitors whether the memory monitoring unit in the step 2) is accessed or not when a virtual machine is sunken; and 5) a monitoring strategy module regards the dynamic memory item where the memory monitoring unit is not accessed by an application program within a set time as the dynamic memory item on suspicion of memory leak. Compared with the prior art, the method can find out the potential memory leak without amending the source code of the detected program or newly encoding so as to provide transparency for the tested code.

Description

technical field [0001] The invention belongs to the technical field of virtualization and relates to a memory leak detection method. Background technique [0002] A memory leak means that the requested memory resources are never used or released at a certain point in the running of the program. If what is leaked is virtual memory, the virtual memory space that the program itself can use becomes less; if what is leaked is physical memory, the entire system reduces the physical addresses that can be used. Memory leaks will cause applications to fail to apply for dynamic memory, resulting in service suspension; in severe cases, the entire system will crash due to resource exhaustion. For programs that run for a short time, memory leaks are generally not a problem; but for long-running programs, such as services running on servers and the operating system itself, memory leaks can have serious consequences and may cause system services to stop. Memory leaks have always been one...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/34G06F11/36
Inventor 汪小林罗英伟刘毅李晓明
Owner PEKING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products