Check patentability & draft patents in minutes with Patsnap Eureka AI!

System for automatically monitoring memory leakage and memory out-of-range in inlaid system

An embedded system, memory leak technology, applied in the computer field, can solve problems such as hindering memory usage, inability to run, destroying other data, etc.

Inactive Publication Date: 2007-06-13
ZTE CORP
View PDF0 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, inappropriate memory operations usually hinder the use of memory, such as: "memory leak", that is, the failure to correctly release the allocated dynamic memory, is a very difficult memory error to detect, continuous memory leaks will make the program The performance drops to the point that it cannot run at all, and then affects all other programs with dynamic memory requirements, and even hinders the operation of the operating system on some relatively simple embedded platforms; another example is "memory out of bounds", an illegal Memory operations are very likely to destroy other data being used in this program, and in severe cases may also affect other running programs or even the entire 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
  • System for automatically monitoring memory leakage and memory out-of-range in inlaid system
  • System for automatically monitoring memory leakage and memory out-of-range in inlaid system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] 下面结合附图和具体实施例对本发明作进一步的介绍,但不作为对本发明的限定。

[0030] 一种自动监测内存泄漏与内存越界系统,包括模块调用感知单元1、管理配置单元2、内存申请单元3、操作结束感知单元4、内存释放单元5、模块退出感知单元6、报警单元7、泄漏内存释放单元8,其中:

[0031] 模块调用感知单元1,用于接收应用程序模块的进入信息;

[0032] 管理配置单元2,用于建立保存模块的标识,模块使用内存情况的模块内存控制区,以及建立模块分配内存地址的内存索引区,并且在模块内存控制区和内存索引区内实时记录应用程序模块对内存的使用情况;

[0033] 内存申请单元3,用于内存申请过程操作;

[0034] 操作结束感知单元4,用于接收应用程序模块的结束信息;

[0035] 内存释放单元5,用于内存释放过程操作;

[0036] 模块退出感知单元6,用于接收应用程序模块的退出信息;

[0037] 报警单元7,与内存释放单元5以及泄漏内存释放单元8连接,用于发出报警提示;

[0038] 泄漏内存释放单元8,用于判断是否存在泄漏内存并释放泄漏内存。

[0039] 在上述单元中,内存申请单元3、内存释放单元5和泄漏内存释放单元8是应用程序模块运行过程中访问内存的接口。

[0040] 以应用程序模块M启动为例,对本系统的工作过程介绍如下:

[0041] 步骤101:模块调用感知单元1检测到应用模块M启动,管理配置单元2建立一个保存模块M的标识,模块M的使用内存情况的模块内存控制区,还建立一个保存模块分配内存地址的内存索引区,该区域包括多个内存索引项,每一个内存索引项指向一个内存地址,初始状态时,内存索引项均置为空闲并且在模块内存控制区和内存索引区内实时记录应用程序模块对内存的使用情况;

[0042] 内存索引区可以是数组,数组的大小根据模块M对内存的使用情况确定一个合理的最大值;也可以是链表的形式,在模块M申请内存的时候动态的添加。

[0043] 步骤102:内存申请单元3在模块M的管理配置单元2的内存索引区中查找一个空闲的内存索引项S1,该内存索引项S1指向的内存索引地址为DS1;通过系统提供的内存分配函数申请大小为Size+Head的一个内存块D1,其中Head的大小为...

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 system for automatically monitoring memory leakage and overstep in an embedded system, comprising: memory application unit, memory release unit, module state sensing unit, management configuration unit and leakage memory release unit, where the module state sensing unit is connected with the memory application unit, memory release unit and leakage memory release unit to trigger them to operate the memory; the management configuration unit is connected with the memory application, memory release unit and leakage memory release unit; an alarm unit is connected with the memory release unit and the leakage memory release unit. And the system makes improper memory operations in an embedded system able to be found in time, beneficial to effective utilization of limited memory in the embedded system.

Description

technical field [0001] 本发明涉及一种嵌入式系统中自动监测内存泄漏与内存越界的系统,属于计算机技术领域。 Background technique [0002] 嵌入式系统是一种资源比较受限的系统,资源要比桌面PC更为宝贵,因而内存有效使用的重要性勿庸置疑。如何利用好有限的内存发挥最大效能,就成了嵌入式系统进一步发展的问题关键。 [0003] 然而,不恰当的内存操作通常阻碍了内存的使用,如:“内存泄漏”,也即不能正确地释放已分配的动态内存,就是一种非常难于检测的内存错误,持续的内存泄漏会使程序性能下降到最终完全不能运行,进而影响到所有其它有动态内存需求的程序,在某些相对简单的嵌入式平台上甚至会妨碍操作系统的运转;又如“内存越界”,一种不合法的内存操作,极可能破坏到本程序中正在使用的其它数据,严重的时候还可能对其它正在运行的程序甚至整个系统造成影响。 [0004] 因此如何有效地监测内存泄漏与内存越界是亟待解决的一个问题。 Contents of the invention [0005] 本发明要解决的技术问题是:提出一种能够自动监测内存泄漏与内存越界的系统,使得嵌入式系统中不恰当的内存操作能够及时发现,有利于嵌入式系统中有限内存的效率使用。 [0006] 本发明是通过下述技术手段来实现的: [0007] 一种嵌入式系统中自动监测内存泄漏与内存越界的系统,包括:内存申请单元、内存释放单元、模块状态感知单元、管理配置单元以及泄漏内存释放单元,其中: [0008] 所述的内存申请单元,用于内存申请过程操作; [0009] 所述的内存释放单元,用于内存释放过程操作; [0010] 所述的模块状态感知单元,用于接收应用程序模块的各种运行状态信息,并与所述的内存申请单元、内存释放单元以及泄漏内存释放单元连接,触发上述单元对内存进行操作; [0011] 所述的管理配置单元,用于建立和实时更新保存模块的标识、模块使用内存情况以及模块分配内存地址的内存索引,与所述的内存申请单元、内存释放单元以及泄漏内存释放单元连接; [0012] 所述的泄漏内存释放单元,用于判断是否存在泄漏内存并释放泄漏内存; [0013] 所述的报警单元,用于进行内存泄漏与内存越界地报警,与所述的内存...

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): G06F9/50G06F12/02
Inventor 蒋敏
Owner ZTE CORP
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More