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

Method and device for monitoring memory leaks

A memory leak and memory technology, applied in the field of electronics, can solve the problem of missing the memory leak problem, the memory cannot determine the specific operation situation, etc., to achieve the effect of simple steps

Active Publication Date: 2017-09-29
LENOVO (BEIJING) LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The present invention provides a method and device for monitoring memory leaks. The method and device provided by the present invention solve the problem in the prior art that the memory leak detection cannot determine the specific operation situation when the memory leak occurs, and miss the scene where the memory leak is found.

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
  • Method and device for monitoring memory leaks
  • Method and device for monitoring memory leaks

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] Aiming at the problem of memory leaks under the GC mechanism in the prior art, the existing solution is: use DDMS (Dalvik Debug Monitor Service, the Dalvik virtual machine debugging monitoring service in the Android development environment) or MAT memory provided by android analyzing tool. However, there are still some shortcomings in this solution, such as: it is necessary to connect to the mobile phone to monitor the memory changes, and the memory leak may occur in some specific scenarios, such as the case of free testing, so it cannot be caught when connecting. In the case of these specific operations, the scenario where a memory leak problem is found is missed. In addition, DDMS involves a more professional operation process, so it needs strong professional technical knowledge to be used flexibly, which leads to inconvenient operation.

[0039] The key to detecting memory leaks is to be able to intercept calls to functions that allocate and free memory. By interce...

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 method and device for monitoring memory leakage. The method includes: monitoring user interface operation information of an application program by a user, and storing the monitored user interface operation information; monitoring system memory usage, and obtaining system memory information; obtain the key field value indicating the memory usage of the application program from the memory information, if the first comparison result is that the key field value is greater than the first preset threshold, it is determined that the occurrence of If a memory leak is detected, an alarm message is generated by using the user interface operation information and the memory information; after receiving a trigger message, the alarm message is output. The method and device provided by the present invention can determine a specific operation scenario when a memory leak problem occurs, analyze the corresponding LOG information, and facilitate developers to quickly locate the memory usage problem in the program.

Description

technical field [0001] The invention relates to the field of electronic technology, in particular to a method and device for monitoring memory leaks. Background technique [0002] In the prior art, when using the JAVA language to develop an application program on the Android system, if it is used improperly, a memory leak is easy to occur. In computer science, a memory leak (memory leak) means that the program fails to release due to negligence or error Re-use of the memory situation. A memory leak does not refer to the physical disappearance of memory, but rather the loss of control over the memory segment due to a design error after the application allocates a certain segment of memory, resulting in a waste of memory. Memory leaks have similar symptoms to many other problems and are usually only detectable by programmers who have access to the program's source code. However, many people are in the habit of describing any unwanted increase in memory usage as a memory leak...

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 Patents(China)
IPC IPC(8): G06F11/30
Inventor 李彬罗静
Owner LENOVO (BEIJING) LTD
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