Memory leakage risk detection method, terminal and computer readable storage medium

A memory leak and risk detection technology, applied in the field of smart terminals, can solve problems such as memory leaks that cannot be completely avoided

Pending Publication Date: 2019-05-31
NUBIA TECHNOLOGY CO LTD
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical problem to be solved by the present invention is that in the prior art, hidden dangers can only be checked when a memory leak error occurs in the code running stage, and the resulting mem

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 leakage risk detection method, terminal and computer readable storage medium
  • Memory leakage risk detection method, terminal and computer readable storage medium
  • Memory leakage risk detection method, terminal and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0069] In order to solve the defect in the prior art that hidden dangers can only be checked when a memory leak error occurs in the code running phase, and the memory leak problem cannot be completely avoided during online operation, this embodiment provides a memory leak risk detection method. Such as image 3 Shown is the basic flow chart of the memory leak risk detection method provided in this embodiment. The memory leak risk detection method specifically includes the following steps:

[0070] S301. Obtain a code file to be tested input to the application program of the code development tool.

[0071] The code development tool in this embodiment is also a programming language development tool. The development tool here may be a code editor for generating human-readable program text, that is, source code, or a code compiler for converting The source code is converted into machine language, which can be directly run by the computer's central processing unit, that is, the co...

no. 2 example

[0092] In order to better understand the present invention, this embodiment uses a specific example to illustrate the memory leak risk detection method, Figure 4 It is a detailed flow chart of the memory leak risk detection method provided in the second embodiment of the present invention. The memory leak risk detection method includes:

[0093] S401. In the code editing stage, from all the code files of the application program input to the code editor, intercept corresponding code file fragments according to the type of the executed task.

[0094] S402. Use the intercepted code file segment as the code file to be detected.

[0095] In this embodiment, only specific code fragments are intercepted from all code files in the editor as the code files to be detected, so that code fragments with high memory leak potential can be intercepted in a targeted manner for detection, and no memory leaks are detected. Detecting leaked hidden codes can effectively improve detection efficie...

no. 3 example

[0107] In order to better understand the present invention, this embodiment uses another specific example to illustrate the memory leak risk detection method, Figure 5 It is a detailed flow chart of the memory leak risk detection method provided in the third embodiment of the present invention. The memory leak risk detection method includes:

[0108] S501. Obtain a code file to be tested input to the application program of the code development tool.

[0109] S502. Match the to-be-detected code file according to the preset code characteristic data with memory leak risk.

[0110] The development tool here may be a code editor or a code compiler, that is, in this embodiment, any one of the two, or both, may be used to perform the matching detection of the code feature data. Wherein, the code feature data may include at least one of the following: keywords, built-in classes of the software development kit SDK.

[0111] S503. When the code feature data is not matched from the co...

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 provides a memory leakage risk detection method, a terminal and a computer readable storage medium. The memory leakage risk detection method comprises the steps of obtaining a to-be-detected code file input to an application program of a code development tool; Matching the to-be-detected code file according to preset code feature data with the memory leakage risk; And when the matching is successful, determining that the to-be-detected code file has a memory leakage risk during operation. In the code development stage, the to-be-tested code is matched according to the code feature data with the memory leakage risk. Therefore, the memory leakage error codes which are easy to negligence by developers are found, the hidden danger of memory leakage is fundamentally eradicated, the possibility that the memory leakage problem explodes after online operation is reduced, and the working efficiency of development and the use experience of users are improved.

Description

technical field [0001] The present invention relates to the technical field of intelligent terminals, and more specifically, to a memory leak risk detection method, a terminal, and a computer-readable storage medium. Background technique [0002] In computer science, a memory leak refers to the allocation of memory for a process to use, but the process does not release the memory after using it, resulting in the allocation of memory cannot be recycled. As the process runs, less and less memory is available in the system, causing the system to crash because there is not enough memory to run the process. The cause of memory leaks may be due to hidden dangers in code written by developers or system exceptions. [0003] At present, in order to prevent the system from being paralyzed by memory leaks, the usual method is to locate the problem code by capturing relevant problem logs through the memory leak inspection tool when an error occurs during the code running phase, that is...

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): G06F21/55G06F21/56
Inventor 杨乐
Owner NUBIA TECHNOLOGY 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