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

Method for detecting memory leakage of heap operational program

A technology for memory leaks and operating programs, applied in the field of static detection of heap operating program memory leaks

Active Publication Date: 2012-09-12
NAT UNIV OF DEFENSE TECH
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The technical problem to be solved by the present invention is: aiming at the problems of accuracy and efficiency of the current memory leak detection method in the memory error detection of the heap operation program with operating characteristics such as dynamic shared memory application, merging, separation, and deletion, to provide a heap-based A memory leak detection method based on forward data flow iteration with local memory abstraction, improving detection accuracy and efficiency

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 for detecting memory leakage of heap operational program
  • Method for detecting memory leakage of heap operational program
  • Method for detecting memory leakage of heap operational program

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0067] specific implementation plan

[0068] figure 1 Overall flow diagram of the invention. The input is the source code of the program, and the output is the statements, abstract states, and various statistical information in the program source code that may cause memory leaks.

[0069] The present invention comprises the following steps:

[0070] 1. First, use the compiler platform to analyze the program source code for sentence analysis and lexical analysis, and generate intermediate files, including: abstract syntax tree, control flow graph and procedure call graph.

[0071] 2. Preprocessing, including: slicing and conversion.

[0072] 3. Obtain the abstract state of the heap memory according to the definition of the extended type of the pointer variable in the program.

[0073] 4. In-process inspection.

[0074] 5. Inter-process detection.

[0075] 6. Check and count the results of memory leak check detection.

[0076] figure 2 It is a flowchart of detection in ...

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 present invention discloses a method for detecting the memory leakage of a heap operational program, is directed to solving a technical problem of the memory error detection of the heap operational program in terms of precision and efficiency, and provides a novel memory leakage detection method with improved precision and efficiency of the detection. The technical scheme comprises analyzing a source code of the program in terms of statement and morphology at first and generating an intermediate file; carrying out a pretreatment which includes slicing and transformation; obtaining an abstract state of a heap memory based on the definition of an extension type of a pointer variable in the program; employing a forward data flow iteration method to implement an in-process detection and an inter-process detection; and finally inspecting and counting results of the memory leakage detection. The method finds a good equilibrium point between precision and efficiency of a static analysis, accelerates the termination of an iterative algorithm, improves the precision and the efficiency of the detection, and has a strong scalability and a low storage overhead.

Description

technical field [0001] The invention relates to a static detection method for memory leakage of a heap operation program with dynamic and variable shared memory operation characteristics in computer programs. Background technique [0002] Heap operation programs include programs that store and process data using dynamic data structures (such as linked lists, trees, etc.), which are very common in system software and application software. For example, operating systems (such as: Linux, FreeRTOS) often use priority queues or hash The tasks of the table management system; the device driver management program uses a shared one-way or two-way linked list to manage various devices; server software (such as: Apache) uses containers (Collection) to accept and store various user requests; information system management software uses various Containers represent views and store data queried from the database. This type of program has the characteristics of dynamically allocating, aggr...

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): G06F11/36
Inventor 王戟董龙明陈立前董威刘万伟李仁见
Owner NAT UNIV OF DEFENSE TECH
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