Method and device for monitoring leakage of memory

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

Active Publication Date: 2014-12-03
LENOVO (BEIJING) LTD
View PDF3 Cites 40 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 leakage of memory
  • Method and device for monitoring leakage of memory
  • Method and device for monitoring leakage of memory

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 a device for monitoring leakage of a memory. The method comprises the following steps of monitoring the operation information of a user interface of a user on an application program, and storing the monitored operation information of the user interface; monitoring the usage condition of the memory of a system, and obtaining the information of the memory of the system; obtaining the key field value for indicating the usage condition of the memory in the application program from the information of the memory; if the first comparison result indicates that the key field value is greater than the first preset threshold, determining the occurrence of leakage of the memory, and utilizing the operation information of the user interface and the information of the memory to generate alarming information; after receiving triggering information, outputting the alarming information. The method and the device have the advantage that the particular operation scene which occurs during the leakage of the memory can be determined, and the corresponding LOG information is analyzed, so a developer can quickly locate the use problem of the memory 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 Applications(China)
IPC IPC(8): G06F11/30
Inventor 李彬罗静
Owner LENOVO (BEIJING) 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