Check patentability & draft patents in minutes with Patsnap Eureka AI!

Application memory leak detection method and device

A technology for memory leaks and detection methods, which is applied in the field of detection methods and devices for memory leaks, and can solve problems such as inability to detect memory leaks in time, inability to use in an online environment, and affecting normal use of users

Pending Publication Date: 2020-02-14
ZHEJIANG KOUBEI NETWORK TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, the inventor found in the process of implementing the present invention that the above-mentioned method in the prior art has at least the following defects: the process of generating the memory image file is very time-consuming, and a large amount of system resources are required to generate the memory image file , therefore, if the application is running at this time, it will cause the application to freeze, thereby affecting the normal use of the user
Therefore, the above detection methods usually cannot be used in the online environment, and can only be used in the test environment, so that the memory leak problem in the online environment of the application cannot be detected in time

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0074] figure 1 A flow chart of a method for detecting an application memory leak provided by Embodiment 1 of the present invention is shown. like figure 1 As shown, the method includes:

[0075] Step S110: Obtain memory usage information and application state information of the target application.

[0076] During specific implementation, the above-mentioned information can be obtained flexibly in various ways. For example, the detection code used to obtain the above-mentioned information can be integrated in the target application, and then the above-mentioned information can be obtained through the detection code integrated in the target application; Set up a detection application independent of the target application, so that the memory usage information and application status information of one or more target applications can be obtained through the detection application.

[0077] Specifically, the memory usage information of the target application is used to represent ...

Embodiment 2

[0087] figure 2 A flow chart of a method for detecting an application memory leak provided by Embodiment 2 of the present invention is shown. like figure 2 As shown, the method includes:

[0088] Step S210: Whenever the preset time arrives, obtain the memory usage information and application status information of the target application corresponding to the preset time, and store the memory usage information and application status information of the target application corresponding to each preset time in the history database. Application state information.

[0089] During specific implementation, step S210 may be triggered periodically according to a preset interval, for example, step S210 is triggered every 30 minutes. Alternatively, step S210 may be triggered once or multiple times within a preset system self-check period. For example, the period from 3:00 am to 3:30 am or from 3:00 am to 5:00 am may be set as the system self-inspection period, and step S210 may be trig...

Embodiment 3

[0128] image 3 It shows a schematic structural diagram of a device for detecting application memory leaks provided by Embodiment 3 of the present invention, and the device includes:

[0129] An acquisition module 31, adapted to acquire memory usage information and application status information of the target application;

[0130] The judging module 32 is adapted to judge whether the current state of the target application is an idle state according to the obtained application state information of the target application when it is determined according to the memory occupation information of the target application that a memory detection operation needs to be triggered;

[0131] The detection module 33 is adapted to control the target application to generate a memory image file if the current state of the target application is an idle state, so as to detect whether a memory leak occurs in the target application according to the memory image file.

[0132] Optionally, the judgi...

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 discloses an application memory leak detection method and an application memory leak detection device, and relates to the field of electronic information. The method comprises the following steps: the memory occupation information and application state information of a target application are obtained; when it is determined that a memory detection operation needs tobe triggered according to the memory occupation information of the target application, whether the current state of the target application is an idle state or not is judged according to the obtained application state information of the target application; If the current state of the target application is an idle state, the target application is controlled to generate a memory mirror image file soas to detect whether memory leakage occurs in the target application or not according to the memory mirror image file. According to the method, the problem of application jamming caused by generationof the mirror image file in the application running process can be prevented, and then the problem of memory leakage in the online running environment can be detected in time.

Description

technical field [0001] Embodiments of the present invention relate to the field of electronic information, and in particular to a method and device for detecting application memory leaks. Background technique [0002] Memory leak refers to the phenomenon that some objects are not recycled at the end of their life cycle and still occupy memory. Memory leaks are relatively common problems in the application development process. Severe memory leaks will consume a large amount of memory, seriously affect the operation of the application, and even cause memory overflow errors. [0003] In the prior art, in order to detect whether the memory leaks, the application usually generates a memory image file corresponding to the application when encountering a memory overflow error, and uploads the memory image file to the server for the server Analyze memory leaks based on memory image files. [0004] However, the inventor found in the process of implementing the present invention tha...

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
IPC IPC(8): G06F9/50G06F11/07
CPCG06F9/5016G06F11/073
Inventor 汤洌
Owner ZHEJIANG KOUBEI NETWORK TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More