CN1979428A - System for automatically releasing applied programe module leaked memory in inlaid system - Google Patents
System for automatically releasing applied programe module leaked memory in inlaid system Download PDFInfo
- Publication number
- CN1979428A CN1979428A CN 200510130087 CN200510130087A CN1979428A CN 1979428 A CN1979428 A CN 1979428A CN 200510130087 CN200510130087 CN 200510130087 CN 200510130087 A CN200510130087 A CN 200510130087A CN 1979428 A CN1979428 A CN 1979428A
- Authority
- CN
- China
- Prior art keywords
- memory
- internal memory
- unit
- leak
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000008447 perception Effects 0.000 claims description 21
- 238000000034 method Methods 0.000 claims description 10
- 238000011112 process operation Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007334 memory performance Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a system for automatically releasing leakage memory of application program module in an embedded system, comprising: internal memory application unit, internal memory release unit, module status sensing unit, management configuration unit and leakage memory release unit, where the module status sensing unit is used to receive various running status messages of the application program module and connect with the internal memory application unit, internal memory release unit and leakage memory release unit to trigger them to operate internal memory; the management configuration unit is used to establish and real-timely update internal memory indexes storing module identifications, memory use conditions of module and memory addresses allocated to module, and connect with the internal memory application unit, internal memory release unit and leakage memory release unit; the leakage memory release unit is used to judge whether there is leakage memory and release the leakage memory. Thus, it can effectively utilize limited memory space.
Description
Technical field
The present invention relates to a kind of system of releasing memory, relate to the system of application program module leak memory in a kind of automatic release embedded system especially, belong to field of computer technology.
Background technology
Embedded system is a relatively limited systems of a kind of resource, and resource is more more valuable than desktop PC, thereby the importance that internal memory effectively uses beyond any doubt.How to make good use of limited internal memory performance maximum efficiency, the key issue that has just become embedded system to further develop.
At present, what most of embedded systems adopted is the real storage management (RSM) strategy, is directly for the visit of internal memory, also promptly directly delivers on the address wire and exports, and the address of visiting in all programs all is the actual physical address; And most of embedded OSs are to not protection of memory headroom, and in fact each program run shares a running space.A program is before execution, system is necessary for it and distributes enough address spaces, and the user memory space is the remaining space after global data and task stack space are all distributed among the RAM, in order to make program that enough internal memory operations can be arranged, must the internal memory of application need not after in time with its release, can have living space when applying for once more guaranteeing.If there is the situation of memory overflow (promptly applying for not having in time to discharge behind the internal memory) in the program, program finally can can't not moved because there being enough memory headrooms.Therefore how to discharge automatically effectively in the embedded system application program module not releasing memory be a problem that needs to be resolved hurrily.
Summary of the invention
The technical problem to be solved in the present invention is: propose a kind of internal memory that discharges of can monitoring automatically not, and the system that discharges automatically, for effective use of internal memory provides condition.
The present invention realizes by following technological means:
The system of application program module leak memory in a kind of automatic release embedded system comprises: internal memory application unit, internal memory releasing unit, module status perception unit, administration configuration unit and leak memory releasing unit, wherein:
Described internal memory application unit is used for the operation of internal memory application process;
Described internal memory releasing unit is used for the operation of internal memory dispose procedure;
Described module status perception unit is used to receive the various running state information of application program module, and is connected with described internal memory application unit, internal memory releasing unit and leak memory releasing unit, triggers said units and internally deposits into line operate;
Described administration configuration unit, be used to set up with real-time update and preserve the sign of module, the internal memory index that module is used internal memory situation and module assignment memory address, be connected with described internal memory application unit, internal memory releasing unit and leak memory releasing unit;
Described leak memory releasing unit is used to judge whether to exist leak memory and discharge leak memory.
Further, described module status perception unit comprises further:
Be used to receive application program module and enter information, and trigger the module invokes perception unit of internal memory application unit internal memory operation;
Be used to receive the application program module ending message, and trigger the EO perception unit of internal memory releasing unit internal memory operation;
Be used to receive application program module and withdraw from information, and trigger the leak memory releasing unit module of internal memory operation is withdrawed from the perception unit.
Further, described leak memory releasing unit judges whether to exist leak memory to realize by following method: judge that whether application program module has corresponding non-NULL internal memory index entry, if having, shows to have memory overflow.
Further, described leak memory releasing unit discharges leak memory to be realized by following method: discharge the memory block of non-NULL internal memory index entry index address pointed, the internal memory index entry is set for empty, discharge this module and set up internal memory index committed memory.
Further, described internal memory index is an array, and array size is the maximum use value of application program module.
Further, described internal memory index is the dynamic link table form, adds automatically when the internal memory application.
Further, the size of described application internal memory is: application program module operation required memory and internal memory index address pointer length sum, described internal memory index address pointer length is 4.
Further, described releasing memory size is: releasing memory piece and internal memory index address pointer length sum, described internal memory index address pointer length is 4.
Further, this system also comprises the alarm unit that links to each other with the internal memory releasing unit, with unequal, the releasing memory error in address of application memory size and when having leak memory, sends alarm in releasing memory.
System proposed by the invention can monitor not the internal memory that discharges automatically, and discharges automatically, for effective use of internal memory in the embedded system provides condition
Description of drawings
Fig. 1 is the structured flowchart that discharges the system of application program module leak memory in the embedded system in the specific embodiment of the invention automatically.
Fig. 2 is the workflow diagram that discharges the system of application program module leak memory in the embedded system in the specific embodiment of the invention automatically.
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is further introduced, but not as a limitation of the invention.
The system of application program module leak memory in a kind of automatic release embedded system, comprise that module invokes perception unit 1, administration configuration unit 2, internal memory application unit 3, EO perception unit 4, internal memory releasing unit 5, module withdraw from perception unit 6, alarm unit 7, leak memory releasing unit 8, wherein:
Module invokes perception unit 1 is used to receive the information that enters of application program module;
Administration configuration unit 2, be used to set up the sign of preserving module, module is used the module memory control zone of internal memory situation, and the internal memory index area of setting up the module assignment memory address, and in module memory control zone and internal memory index area the real time record application program module to the operating position of internal memory;
Internal memory application unit 3 is used for the operation of internal memory application process;
EO perception unit 4 is used to receive the ending message of application program module;
Internal memory releasing unit 5 is used for the operation of internal memory dispose procedure;
Module withdraws from perception unit 6, is used to receive the information that withdraws from of application program module;
Alarm unit 7 is connected with internal memory releasing unit 5 and leak memory releasing unit 8, is used to send alarm;
Leak memory releasing unit 8 is used to judge whether to exist leak memory and discharge leak memory.
In said units, internal memory application unit 3, internal memory releasing unit 5 and leak memory releasing unit 8 are interfaces of access memory in the application program module operational process.
Starting with application program module M is example, and the course of work of native system is described below:
Step 101: module invokes perception unit 1 detects application module M and starts, a sign of preserving module M is set up in administration configuration unit 2, the module memory control zone of the use internal memory situation of module M, also set up an internal memory index area of preserving the module assignment memory address, this zone comprises a plurality of internal memory index entries, each internal memory index entry points to a memory address, during original state, the internal memory index entry all be changed to the free time and in module memory control zone and internal memory index area the real time record application program module to the operating position of internal memory;
The internal memory index area can be an array, and the size of array is determined a rational maximal value according to module M to the operating position of internal memory; Also can be the form of chained list, in module M application internal memory, add dynamically.
Step 102: internal memory application unit 3 is searched the internal memory index entry S1 of a free time in the internal memory index area of the administration configuration unit 2 of module M, and the internal memory index address that this internal memory index entry S1 points to is DS1; The memory allocation function application size that provides by system is the memory block D1 of Size+Head, and wherein the size of Head is the length of memory address pointer, is generally 4, and the internal memory index address of this memory block D1 correspondence is DS1.
At this moment, administration configuration unit 2 corresponding record module M in the module memory control zone comprises the operating position of internal memory: use address, committed memory block size.
Step 103: EO perception unit 4 receives the end operation information of application program module M, sends the trigger pip of the internal memory that discharges this application program module M application to internal memory releasing unit 5;
Step 104: internal memory releasing unit 5 reads internal memory index address DS1, and relatively whether the size of the memory block P-Head at this place, address equals the size of memory block D1, if, then discharging this memory block, the content that DS1 is set is for empty; If not, illustrate that the internal memory P address that need to discharge is wrong or this memory block is destroyed, this information is passed to alarm unit 7, carry out internal memory and discharge false alarm;
Step 105: module withdraws from the information that withdraws from that perception unit 6 receives application program module M, sends the trigger pip that discharges leak memory to leak memory releasing unit 8;
Step 106: leak memory releasing unit 8 is searched all internal memory index entries of application program module M correspondence, if certain internal memory index entry is arranged not for empty, illustrate that this application program module M has memory overflow, discharge corresponding memory block, this internal memory index entry is set for empty, and this information passed to alarm unit 7, carry out memory overflow and report to the police; Discharge the internal memory index area of this module M then.
Claims (9)
1, the system of application program module leak memory in a kind of automatic release embedded system, comprise: be used for internal memory application process operation the internal memory application unit, be used for the internal memory releasing unit of internal memory dispose procedure operation, it is characterized in that, this system also comprises: module status perception unit, administration configuration unit and leak memory releasing unit, wherein:
Described module status perception unit is used to receive the various running state information of application program module, and is connected with described internal memory application unit, internal memory releasing unit and leak memory releasing unit, triggers said units and internally deposits into line operate;
Described administration configuration unit is used to set up with real-time update and preserves the sign of module, the internal memory index that module is used internal memory situation and module assignment memory address; Be connected with described internal memory application unit, internal memory releasing unit and leak memory releasing unit;
Described leak memory releasing unit is used to judge whether to exist leak memory and discharge leak memory.
2, the system of application program module leak memory in a kind of automatic release embedded system as claimed in claim 1 is characterized in that described module status perception unit comprises further:
Be used to receive application program module and enter information, and trigger the module invokes perception unit of internal memory application unit internal memory operation;
Be used to receive the application program module ending message, and trigger the EO perception unit of internal memory releasing unit internal memory operation;
Be used to receive application program module and withdraw from information, and trigger the leak memory releasing unit module of internal memory operation is withdrawed from the perception unit.
3, the system of application program module leak memory in a kind of automatic release embedded system as claimed in claim 1, it is characterized in that, described leak memory releasing unit judges whether to exist leak memory to realize by following method: judge whether application program module has corresponding non-NULL internal memory index entry, if have, show to have memory overflow.
4, the system of application program module leak memory in a kind of automatic release embedded system as claimed in claim 1, it is characterized in that, described leak memory releasing unit discharges leak memory to be realized by following method: the memory block that discharges non-NULL internal memory index entry index address pointed, the internal memory index entry is set for empty, discharges this module and set up internal memory index committed memory.
5, the system of application program module leak memory in a kind of automatic release embedded system as claimed in claim 1 is characterized in that described internal memory index is an array, and array size is the maximum use value of application program module.
6, the system of application program module leak memory in a kind of automatic release embedded system as claimed in claim 1, it is characterized in that: described internal memory index is the dynamic link table form, adds automatically when the internal memory application.
7, the system of application program module leak memory in a kind of automatic release embedded system as claimed in claim 1, it is characterized in that: the size of described application internal memory is: application program module operation required memory and internal memory index address pointer length sum, described internal memory index address pointer length is 4.
8, the system of application program module leak memory in a kind of automatic release embedded system as claimed in claim 1, it is characterized in that: described releasing memory size is: releasing memory piece and internal memory index address pointer length sum, described internal memory index address pointer length is 4.
9, the system of application program module leak memory in a kind of automatic release embedded system as claimed in claim 1, it is characterized in that: this system also comprises the alarm unit that links to each other with the leak memory releasing unit with the internal memory releasing unit, with unequal, the releasing memory error in address of application memory size and when having leak memory, send alarm in releasing memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005101300875A CN100472459C (en) | 2005-12-08 | 2005-12-08 | System for automatically releasing applied programe module leaked memory in inlaid system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005101300875A CN100472459C (en) | 2005-12-08 | 2005-12-08 | System for automatically releasing applied programe module leaked memory in inlaid system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1979428A true CN1979428A (en) | 2007-06-13 |
CN100472459C CN100472459C (en) | 2009-03-25 |
Family
ID=38130606
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005101300875A Expired - Fee Related CN100472459C (en) | 2005-12-08 | 2005-12-08 | System for automatically releasing applied programe module leaked memory in inlaid system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100472459C (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009114985A1 (en) * | 2008-03-21 | 2009-09-24 | 中兴通讯股份有限公司 | Memory leaking detecting device and method |
CN102866953A (en) * | 2011-07-08 | 2013-01-09 | 风网科技(北京)有限公司 | Storage management system and storage management method thereof |
WO2015117426A1 (en) * | 2014-07-24 | 2015-08-13 | 中兴通讯股份有限公司 | File management method and device |
CN105008814A (en) * | 2013-03-04 | 2015-10-28 | 三菱电机株式会社 | Management device and method for air conditioner |
WO2016082591A1 (en) * | 2014-11-26 | 2016-06-02 | 中兴通讯股份有限公司 | Method and device for embedded system to count memory |
CN112100089A (en) * | 2020-07-30 | 2020-12-18 | 北京智行者科技有限公司 | Memory management method |
CN113535150A (en) * | 2021-07-29 | 2021-10-22 | 北京大学 | Memory leakage-free programming method for DRAM/NVM hybrid memory |
-
2005
- 2005-12-08 CN CNB2005101300875A patent/CN100472459C/en not_active Expired - Fee Related
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009114985A1 (en) * | 2008-03-21 | 2009-09-24 | 中兴通讯股份有限公司 | Memory leaking detecting device and method |
CN102866953A (en) * | 2011-07-08 | 2013-01-09 | 风网科技(北京)有限公司 | Storage management system and storage management method thereof |
CN105008814A (en) * | 2013-03-04 | 2015-10-28 | 三菱电机株式会社 | Management device and method for air conditioner |
CN105008814B (en) * | 2013-03-04 | 2017-09-29 | 三菱电机株式会社 | The managing device and method of air conditioner |
WO2015117426A1 (en) * | 2014-07-24 | 2015-08-13 | 中兴通讯股份有限公司 | File management method and device |
WO2016082591A1 (en) * | 2014-11-26 | 2016-06-02 | 中兴通讯股份有限公司 | Method and device for embedded system to count memory |
CN112100089A (en) * | 2020-07-30 | 2020-12-18 | 北京智行者科技有限公司 | Memory management method |
CN112100089B (en) * | 2020-07-30 | 2023-08-01 | 重庆兰德适普信息科技有限公司 | Memory management method |
CN113535150A (en) * | 2021-07-29 | 2021-10-22 | 北京大学 | Memory leakage-free programming method for DRAM/NVM hybrid memory |
CN113535150B (en) * | 2021-07-29 | 2023-09-22 | 北京大学 | Programming method for DRAM/NVM hybrid memory without memory leakage |
Also Published As
Publication number | Publication date |
---|---|
CN100472459C (en) | 2009-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100472459C (en) | System for automatically releasing applied programe module leaked memory in inlaid system | |
CN102156675B (en) | Method and device for allocating memory | |
JP4701321B2 (en) | Memory management | |
CN100386745C (en) | Method and apparatus for dynamic memory management within an object-oriented program | |
CN100487658C (en) | Method for detecting memory accessing outside | |
US7519787B2 (en) | Method and a computer for storage area management | |
CN101593152B (en) | Method and device for detecting memory leakage of mobile terminal | |
CN102063338B (en) | Method and device for requesting exclusive resource | |
CN104951395A (en) | Debugging information processing method and device for embedded system | |
CN103425592A (en) | Memory management method and device for multiprocess system | |
EP2466943B1 (en) | Method and device for monitoring running state of card | |
CN105068769A (en) | Message middleware based message management method and apparatus | |
CN112698789B (en) | Data caching method, device, equipment and storage medium | |
CN105988921A (en) | Method and device for detecting out of range problem of memory | |
CN107209716A (en) | Memory management apparatus and method | |
CN100530110C (en) | System for automatically monitoring memory leakage and memory out-of-range in inlaid system | |
CN108763046B (en) | Thread running monitoring method, device, computer equipment and storage medium | |
CN100462925C (en) | Method for automatically releasing applied programe module leaked memory in inlaid system | |
EP3564814A1 (en) | Method and device for starting and operating system, and computer storage medium | |
CN105450679A (en) | Method and system for performing data cloud storage | |
CN1979427A (en) | Method for automatically memory leakage and memory out-of-range in inlaid system | |
CN107977265A (en) | Internal memory initialization method, apparatus and memory allocation method, device | |
CN106339265A (en) | Method and device for processing combined task | |
CN109933435A (en) | Control method, device and computer equipment | |
CN102419693A (en) | Method for managing disk space of memory cell and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090325 |
|
CF01 | Termination of patent right due to non-payment of annual fee |