Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Dynamic internal memory leakage detecting method and device based on VxWorks operation system

A technology of vxworks and dynamic memory, which is applied in the direction of memory address/allocation/relocation, software testing/debugging, etc. It can solve the problems of low error detection efficiency and slow speed, and achieve the effect of improving error detection efficiency and speed

Active Publication Date: 2013-12-18
HARBIN INST OF TECH
View PDF3 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The purpose of the present invention is to solve the problem of low error detection efficiency and slow speed of the current dynamic memory leak detection. The present invention provides a dynamic memory leak detection method and device based on the VxWorks operating system

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
  • Dynamic internal memory leakage detecting method and device based on VxWorks operation system
  • Dynamic internal memory leakage detecting method and device based on VxWorks operation system

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment approach 1

[0035] Specific implementation mode one: combine figure 1 Describe the present embodiment, the dynamic memory leak detection method based on the VxWorks operating system described in this embodiment, the dynamic memory leak detection method based on the VxWorks operating system of the present invention, it is based on the industrial computer and the host computer that the VxWorks operating system is installed. Yes, the industrial computer is embedded with industrial computer software, and the working process of the industrial computer software includes the following steps:

[0036] Steps for calling function LC_malloc() and function LC_free() to realize dynamic memory tracking, and recording the memory allocation and memory release information of each event item in the form of a log;

[0037] The function LC_malloc() is used to allocate memory according to the parameters of the memory size required by the user. If a valid memory address is returned, the dynamic memory allocati...

specific Embodiment approach 2

[0055] Specific embodiment two: present embodiment is the further limitation of the dynamic memory leak detection method based on VxWorks operating system described in specific embodiment one, and it also includes:

[0056] By means of macro definition, rewrite the memory allocation function malloc() to obtain the steps of function LC_malloc();

[0057] By means of macro definition, rewrite the memory release function free() to obtain the steps of function LC_free().

[0058] The problem caused by the inconsistency of malloc and LC_malloc function interfaces can be solved by macro definition. Since the detection of memory leaks occurs in the program testing stage, macros can be used to replace the LC_malloc() function, so that the function interfaces provided to users are all malloc( ). The form is as follows:

[0059] #ifdef_DEBUG

[0060] #define DEBUG_MALLOC(size)LC_malloc(size,_FILE_,_LINE_)

[0061] #else

[0062] #define DEBUG_MALLOC malloc

[0063] #endif

[0064...

specific Embodiment approach 3

[0068] Specific embodiment three: this embodiment is a further limitation of the dynamic memory leak detection method based on the VxWorks operating system described in specific embodiment one,

[0069] The function LC_malloc () is used to allocate memory according to the parameters of the user's required memory size:

[0070] The function LC_malloc() is used to allocate memory according to the parameters in the physical block linked list; the function LC_free() is used to release the specified memory as:

[0071] The function LC_free() is used to release the memory specified in the physical block list;

[0072] The physical block linked list is used for storing the state of all memory blocks and connecting all allocated memory blocks and unallocated memory blocks adjacent to each other in physical position.

[0073] In this embodiment, a new data structure is introduced to manage the linked list. The traditional memory management method is to use two linked lists, one is an ...

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 dynamic internal memory leakage detecting method and device based on a VxWorks operation system, relates to dynamic internal memory leakage detecting methods and devices, and aims to solve the problem that current dynamic internal memory leakage detection is low in error detection efficiency and low in speed. The method includes: modifying an internal memory distribution function malloc () and an internal memory release function free () to obtain a function LC_malloc () and a function LC_free (), and recording distribution and releasing information in a form of log to realize dynamic internal memory tracking; using a data transmitting buffer queue to upload the log information from an industrial personal computer with the VxWorks operation system to an upper computer; in the upper machine, reading log events from the log files, comparing internal memory distribution and releasing, and analyzing and detecting internal memory leakage from the log files. The method is suitable for dynamic internal memory leakage detection.

Description

technical field [0001] The invention relates to a dynamic memory leak detection method and device, in particular to a dynamic memory leak detection method and device based on a VxWorks operating system. Background technique [0002] VxWorks is a real-time operating system developed by Wind River Corporation of the United States. It is widely used in many fields with high real-time requirements due to its good reliability and excellent real-time performance. Generally, products using the VxWorks operating system have a certain amount of memory and need to run stably for a long time, so a small amount of memory leaks for a long time is not suitable for the system. During the running of the program, there are many errors related to dynamic memory management in the program, including memory leaks, repeated release of memory, and null pointer references. These errors account for 50% of memory failures in software systems, and these errors cause the system to fail or even crash, ...

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/36G06F12/02
Inventor 陈兴林刘川杨天博刘杨
Owner HARBIN INST OF TECH
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
Eureka Blog
Learn More
PatSnap group products