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

Memory leak detecting method and memory leak detecting device

A technology of memory leaks and detection methods, applied in software testing/debugging, etc., can solve problems such as lack of real-time performance of offline analysis, time-consuming and labor-intensive manual comparison, and reduced software performance, so as to improve software performance, reduce detection range, and reduce difficulty Effect

Inactive Publication Date: 2015-04-29
DATANG MOBILE COMM EQUIP CO LTD
View PDF7 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, offline analysis lacks real-time performance and is not intuitive enough. At the same time, the management of log files and slow IO (Input / Output, input / output) operations such as reading and writing lead to reduced software performance.
[0006] The second way of thinking is to support manual extraction of the relevant information of the currently applied memory and print it out, and use the method of extracting the results of multiple printings for manual comparison for detection. Although this idea is feasible, manual comparison is time-consuming and laborious, and it is not easy to operate.
[0007] The third way of thinking is to perform a Hash (hash) operation search on the usage record of the memory address during the memory application and memory release, and add or delete the usage record of the memory block through the search. However, the Hash operation needs to apply for an additional piece of memory. Record the application and release information of the original memory, so the work efficiency of the third way of thinking 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 detecting method and memory leak detecting device
  • Memory leak detecting method and memory leak detecting device
  • Memory leak detecting method and memory leak detecting device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0059] In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0060] One of the core ideas of the embodiment of the present invention is to store the memory header information by reserving a monitoring space for each block of memory, and record the timestamp and applicant information corresponding to each block of memory application; and when the user memory is released, it can quickly locate And delete the "allocated" attribute of the memory block; the user can determine the purpose of the memory by checking the memory header information of the memory that has been applied for and not released within the detection time period from the start timestamp T1 to the end timestamp T2 , so as to determine whether a memory leak has occurred.

[0061] refer to figure 1 , which shows a flow chart of ...

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 provides a memory leak detecting method and a memory leak detecting device. A memory comprises a doubly linked list of an allocated memory; and the doubly linked list comprises memory header information of one or more allocated memory blocks. The method comprises the steps of: determining a detection time interval; traversing the header information in the detection time interval in the doubly linked list; and in accordance with the memory header information, determining whether the corresponding one or more allocated memory blocks are subject to memory leak. By the memory leak detecting method and the memory leak detecting device, memory leak can be visually detected in real time, the software performance is improved, and manual operation is reduced or avoided, so that the method and the device are labor-saving and time-saving, the operation difficulty is reduced, the working efficiency is improved, the cost is reduced, the accuracy of the detection of memory leak is improved, and the leaked memory can be recycled in the entity life cycle.

Description

technical field [0001] The invention relates to the technical field of testing, in particular to a memory leak detection method and a memory leak detection device. Background technique [0002] In computer science, a memory leak is a situation in which, due to inadvertence or error, a program fails to free memory that is no longer in use. A memory leak does not refer to the physical disappearance of the memory, but rather the loss of control over the memory due to a design error after the application allocates a certain segment of memory, resulting in a waste of memory. [0003] With the increasing scale of modern software, in the software development process that requires software developers to explicitly apply for and release memory, a large number of memory applications and releases are often required with the processing of business flow or control flow, which is easy to cause problems in some Memory leaks occur due to the missed release of abnormal branches. However, su...

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/36
Inventor 赵金芳
Owner DATANG MOBILE COMM EQUIP CO 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