Method and system for detecting memory occupancy state of embedded system

An embedded system, memory occupation technology, applied in the direction of software testing/debugging, can solve the problems of system crash, large system resource requirements, small embedded system memory, etc., to achieve the effect of convenient detection and strong versatility

Inactive Publication Date: 2011-05-25
FUJIAN STAR NET EVIDEO INFORMATION SYST CO LTD
View PDF2 Cites 22 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] On the X86 platform, virtual machine technology is used to fully monitor the memory usage of the entire program, and all relevant information can be obtained. Moreover, most memory detection tools are based on the X86 architecture, such as: BoundsChecker, Purify, etc. The function is very powerful, but this type of memory detection tool requires a lot of system resources; that is, it needs to occupy a large amount of memory and CPU resources, such as: monitoring a server program, it needs to run for several days, weeks or even months, if There are memory leaks or errors, and if the memory is not released in time, the system performance will be low, the efficiency will be slow, and the system will even crash
[0004] In embedded software, the memory of the embedded system is small, the CPU runs slowly, and memory leaks will seriously affect the performance of the embedded system. Therefore, effective tools should be used to detect its memory usage. However, most The detection tool only provides the information of the last function where the memory leak occurs, and does not provide the function call chain
It is impossible to know exactly in which function call chain a memory leak occurs, and it is impossible to precisely locate the problem
A hook is added to the GCC memory management function, and the memory usage information is output to a file at runtime, and finally counted, but the memory usage information cannot be accurately obtained; some tools use the backtrace function of GCC to obtain the function call chain, but this The function is related to the chip system, and its versatility is not strong. In some chip systems, such as: mips system, this function cannot get this information

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 and system for detecting memory occupancy state of embedded system
  • Method and system for detecting memory occupancy state of embedded system
  • Method and system for detecting memory occupancy state of embedded system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] In order to describe the technical content, structural features, achieved goals and effects of the present invention in detail, the following will be described in detail in conjunction with the embodiments and accompanying drawings.

[0037] In information technology, computer memory usage often affects the performance of a system, especially when a memory leak seriously affects the system, which will not only lead to waste of space, lower system performance, but also cause complex memory exhaustion. Furthermore, a memory The leaked program may use up a lot of memory and cause errors in other programs, but the user does not know where the error comes from. In addition, a seemingly harmless memory leak may be a harbinger of another problem. Therefore, try to avoid memory leaks. Occurrence of leakage.

[0038] see figure 1 , in the first embodiment of the present invention, the embedded system memory occupation status detection method of the present invention comprises: ...

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 method and a system for detecting memory occupancy state of an embedded system, and the method for detecting the memory occupancy state of the embedded system comprises the following steps: S1) taking over a memory management function and performing function call; S2) tracking the function call and acquiring a call chain of a thread when the function runs so as to be convenient to position precise positions for applying for and releasing a memory; S3) performing statistics on the memory by adopting the way of a two-way chained list and detecting the memory occupancy situation; and S4) displaying the memory occupancy situation. The invention further discloses the system for detecting the memory occupancy state of the embedded system. As for the method and the system for detecting the memory occupancy state of the embedded system, the memory management function is taken over, call information of the current function is tracked, the memory leakage position can be accurately positioned, the memory occupancy situation can be displayed, the universality is strong, and the detection of the memory using problem can be greatly facilitated.

Description

technical field [0001] The invention relates to the field of embedded software, in particular to a method and system for detecting memory occupation status of an embedded system. Background technique [0002] At present, with the development of information technology, computers are widely used in all fields. Among them, the use of computer memory often affects the efficiency of a system operation. If there is a memory leak or memory error, it will greatly affect the system. efficiency. The so-called memory leak is generally a leak of heap memory. Heap memory refers to the memory allocated from the heap by using some specific functions during the running of the application, and then released by specific functions after use. If the application does not release it after use, this memory cannot be used again, and this memory is considered to be leaked. [0003] On the X86 platform, virtual machine technology is used to fully monitor the memory usage of the entire program, and ...

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 FUJIAN STAR NET EVIDEO INFORMATION SYST 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