Memory leak detection method and device

A memory leak and detection method technology, which is applied in the field of memory leak detection methods and equipment, can solve the problems of low efficiency of memory leak detection, achieve the effect of small order of magnitude, improve efficiency, and avoid multi-thread concurrency problems

Active Publication Date: 2018-10-16
HUAWEI TECH CO LTD
View PDF15 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, in practice, it has been found that the above-mentioned entire memory leak detection process requires human participation, and personnel familiar with memory leak scenarios are required to detect memory leaks, and the efficiency of memory leak detection is low

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 and device
  • Memory leak detection method and device
  • Memory leak detection method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0064] The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0065] See figure 1 , figure 1 It is a schematic diagram of an architecture model of a Java Virtual Machine Tool Interface (JVMTI) disclosed in an embodiment of the present invention. JVMTI is a C-based application programming interface (Application Programming Interface, API), through the JVMTI function can monitor applications, etc., its architecture model can be as figure 1 Shown. The JVMTI can subscribe to the running application for events of interest, such as the recycling of objects, the end of threads, etc., when the subscribed event occurs, the JVMTI can be activated in the form of a callback function, and provided through the JVMTI The function function of to handle the event. It should be noted that the embodiments of the present invention include but are not limited to the Java language, for example, may also include other programming languages ​​f...

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 embodiment of the invention relates to the computer field, and discloses a memory leakage detection method and a device thereof. The method comprises the following steps: when a Java application program runs in a virtual machine, calling a Java virtual machine tool interface JVMTI to monitor whether an object which is recycled exists; wherein the object is associated with an identifier; removing an identifier associated with the object in a preset set in the event that an object which is recycled is monitored; wherein the preset set comprises respective associated identifiers of a plurality of objects; an object associated with one or more of the remaining identifiers in the preset set is determined to be a memory leak object. The embodiment of the invention can improve the efficiencyof memory leak detection.

Description

Technical field [0001] The invention relates to the field of computers, in particular to a method and equipment for detecting memory leaks. Background technique [0002] In the computer field, memory leak means that memory that is no longer used by a program cannot be recovered due to negligence or error. As the application program runs, the available memory in the system becomes less and less, causing the system to be paralyzed due to insufficient memory. [0003] Currently, the method of detecting memory leaks is a memory analysis tool. The memory analysis tool first finds classes with high risk of memory leaks by artificially judging the number of object instances or the size of the object memory occupied by the files exported when the application is running; then export a file at another time for the same analysis and comparison Two analysis results, if it is found that the number of instances of a certain class has increased significantly, and the general trend is that it ke...

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/36G06F9/455
CPCG06F9/45558G06F11/3636G06F2009/45591
Inventor 焦石蒋启刚
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products