CN109471771A - A kind of the dynamic memory pool monitoring method and device of Nucleus system - Google Patents

A kind of the dynamic memory pool monitoring method and device of Nucleus system Download PDF

Info

Publication number
CN109471771A
CN109471771A CN201811223950.5A CN201811223950A CN109471771A CN 109471771 A CN109471771 A CN 109471771A CN 201811223950 A CN201811223950 A CN 201811223950A CN 109471771 A CN109471771 A CN 109471771A
Authority
CN
China
Prior art keywords
memory
memory pool
pool
chained list
dynamic
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
Application number
CN201811223950.5A
Other languages
Chinese (zh)
Other versions
CN109471771B (en
Inventor
牛勇永
陈献庆
信亚磊
王予宽
牛乐土
姜晗
尹立业
韩啸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xuji Group Co Ltd
XJ Electric Co Ltd
Xuchang XJ Software Technology Co Ltd
Original Assignee
Xuji Group Co Ltd
XJ Electric Co Ltd
Xuchang XJ Software Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xuji Group Co Ltd, XJ Electric Co Ltd, Xuchang XJ Software Technology Co Ltd filed Critical Xuji Group Co Ltd
Priority to CN201811223950.5A priority Critical patent/CN109471771B/en
Publication of CN109471771A publication Critical patent/CN109471771A/en
Application granted granted Critical
Publication of CN109471771B publication Critical patent/CN109471771B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a kind of dynamic memory pool monitoring method of Nucleus system and devices, belong to dynamic memory pool analysis technical field.The present invention is based on the symbol resolution of memory pool variable, the structural information of Nucleus system dynamic memory pool chain table address and chained list node is determined by symbol resolution, and the information about firms of memory pool control block structural body, each dynamic memory pool information can be obtained by directly reading memory by above- mentioned information.The present invention can quickly, easily realize the monitoring to its dynamic memory pool information in Nucleus system operation, and Nucleus user is enable accurately to understand the service condition of system current memory.

Description

A kind of the dynamic memory pool monitoring method and device of Nucleus system
Technical field
The present invention relates to a kind of dynamic memory pool monitoring method of Nucleus system and devices, belong to dynamic memory pool point Analyse technical field.
Background technique
Nucleus operating system is one formula multiple task operating system of trying to be the first of design for real-time embedded application, 95% code is to be write as with ANSIC, therefore be highly convenient for transplanting and can support most types of processor.Simultaneously Nucleus system has many advantages, such as, such as: provide that source code, cost performance are high, be easy to learn and use, functional module is abundant, these all make It obtains Nucleus system to be used widely in numerous areas, such as: network, routing, data communication, automobile, Medical Instruments, safety Secrecy, Industry Control, satellite communication etc..
Dynamic memory distribution is widely applied in Nucleus system, these dynamic memory distributions are typically all to be based on The dynamic memory management module of Nucleus operating system realizes that some dynamic memory distributions are directly to operate to be in Nucleus It is carried out in the global memory pool of system, it is also some, it is the dedicated memory pool that application module is created in Nucleus memory management Middle distribution.However the data of the distribution of memory, release and storage be for Nucleus system user it is sightless, it is interior The service condition and health status deposited are unknowable.Since dynamic memory distribution carrys out the scale of storage allocation block as needed, because This with memory block continuous distribution and release, it will cause to occur the memory fine crushing that can not distribute between partial memory block empty Between, i.e., memory fragmentation, these memory fragmentations will gradually cause running efficiency of system low with accumulated time;If in the presence of in Leakage is deposited, then will appear the case where memory exhausts at last with time change, is restarted so as to cause system in case of system halt.If can To find the service condition and its health status of memory in system operation early, so that it may take steps in optimization early Use is deposited, thus the potential risk during avoidance system is run.So to the prison of Nucleus system dynamic memory pool operating status It surveys, the operating status and health status of system can be intuitively understood, this is significant to the stable operation of Nucleus system.
Dynamic memory pool structure in Nucleus system is as shown in Figure 1, Nucleus system passes through dynamic memory pool control block Chained list DMD_Created_Pools_List carrys out maintenance and management dynamic memory pool.System one dynamic memory pool of every generation, just One dynamic memory pool control block relevant to the memory pool of creation can be synchronized, memory pool control block stores dynamic memory pool Title, scale, available space, smallest allocation space, memory block chain table address, hangs up waiting task dispatching information at address.In dynamic It deposits the creation of pond control block to be added in memory pool control block chained list later, in this way, system can pass through dynamic memory pool Control block chained list finds the memory pool and is managed to it.
For each specified dynamic memory pool, system by memory block header structure chained list dm_memory_list come pair It carries out maintenance and management.It is relevant to the memory block interior will to synchronize creation one for system one dynamic memory block of every distribution Counterfoil header structure, memory block header structure store the idle state of the memory block, affiliated memory pool pointer and with the memory Block be connected upper one piece and next piece of memory block header structure pointer.After the creation of memory block header structure, it is just added to phase It answers in the memory block header structure chained list of memory pool.
Therefore memory pool control block stores the macroscopic information of memory pool, the then more description in detail of memory block header structure chained list The specific distribution condition in specified memory pond so specifically to monitor the dynamic memory pool of Nucleus system needs accurate and effective Obtain dynamic memory pool chained list, memory pool control block and memory block header structure chained list operation information.And it lacks in the prior art The real-time monitoring of few dynamic memory pool to Nucleus system, causes Nucleus system that can not understand dynamic memory pool in time Service condition.
Summary of the invention
The object of the present invention is to provide a kind of dynamic memory pool monitoring methods of Nucleus system, to realize to Nucleus The real-time monitoring of the dynamic memory pool of system;The present invention also provides a kind of monitorings of the dynamic memory pool of Nucleus system simultaneously Device.
The present invention provides a kind of dynamic memory pool monitoring method of Nucleus system to solve above-mentioned technical problem, should Monitoring method the following steps are included:
1) Nucleus system dynamic memory pool chained list initial address is obtained by symbol resolution, the type of chained list node is believed The member type of breath and memory pool control block structural body;
2) dynamic memory pool chained list is traversed, the memory address of each memory pool control block is obtained;
3) memory is directly read according to the offset of each member's relative origin of memory pool control block and member type, with Title, address, gross space, remaining space and the hang-up number of tasks for obtaining each dynamic memory pool, realize each memory pool information Monitoring.
The present invention determines Nucleus system dynamic by symbol resolution based on the symbol resolution of memory pool variable The information about firms of the structural information and memory pool control block structural body of memory pool chain table address and chained list node, by above-mentioned Information, which directly reads memory, can obtain each dynamic memory pool information.The present invention quickly, can be realized easily to Nucleus The monitoring of its dynamic memory pool information in system operation, enables Nucleus user accurately to understand system current memory Service condition.
Further, the distribution of each memory block in memory pool can be accurately understood in order to facilitate Nucleus user and make With situation, this method further includes the monitoring of memory pool distribution information, process are as follows: traversal dynamic memory pool chained list obtains specified memory The initial address of the memory block header structure chained list in pond, according to the initial address of obtained memory block header structure chained list to the memory block Header structure chained list is traversed, and the size of each memory block in the specified memory pond is obtained, and counts same size memory block Quantity.
Further, the distribution situation of memory fragmentation in memory pool can be accurately understood in order to facilitate Nucleus user, it should Method further includes the monitoring to memory pool fragment information, process are as follows: traversal dynamic memory pool chained list obtains the interior of specified memory pond The initial address of counterfoil header structure chained list, according to the initial address of obtained memory block header structure chained list to the memory block header structure Chained list is traversed, and determines the distribution situation of each memory block use and idle condition and memory fragmentation.
Further, the out-of-limit situation of memory pool can accurately be understood in order to facilitate Nucleus user, this method further includes pair The out-of-limit monitoring of memory pool, process are as follows: traversal dynamic memory pool chained list obtains the memory block header structure chained list in specified memory pond Initial address traverses the memory block header structure chained list according to the initial address of obtained memory block header structure chained list, inspection The correctness that the data member correctness and chain table pointer looked into all memory block header data structures are directed toward, if correct, Illustrate that the memory pool is not out-of-limit.
Further, in order to realize in memory block header data structure data member correctness and chain table pointer be directed toward Correctness judgement, the present invention gives specific judgment mode, judges that memory block header structure data member correctness is Judge that memory block idle state identifies correctness, if idle state ident value is Boolean, then it is assumed that control block idle state mark Know correct;Judging that chain table pointer is directed toward correctness is to directly read current memory control block to be directed toward a upper memory block pointer and institute Belong to memory pool pointer, if two pointers are directed toward corresponding memory block and memory pool, then it is assumed that chain table pointer is directed toward correct.
Further, memory pool memory overflow situation can accurately be understood in order to facilitate Nucleus user, this method is also wrapped Include the monitoring to memory pool leakage, process are as follows: traversal dynamic memory pool chained list finds the memory pool control block of memory pool, according to setting It fixes time to be spaced and reads the memory pool available space size, determine that available space accounts for gross space percentage and changes over time situation, When memory pool available space is changed over time in trend is gradually reduced, the case where determining the memory pool there are memory overflows.
Further, broken to memory pool in order to enable Nucleus user intuitively to find out the distribution situation of memory fragmentation The monitoring of piece information further includes showing the distribution situation of memory fragmentation by way of pie chart and distribution map.
Further, in order to enable Nucleus user intuitively to find out that memory pool whether there is leakage, memory pool is let out The monitoring of leakage further includes available space is accounted for gross space percentage changing over time situation to show by way of Dynamic Graph.
The present invention also provides a kind of dynamic memory pool monitoring device of Nucleus system, which includes processing Device and memory and storage on a memory and the computer program that can run on a processor, described in the processor execution The dynamic memory pool monitoring method of Nucleus system of the invention is realized when computer program.
Detailed description of the invention
Fig. 1 is existing Nucleus system dynamic memory pool structural schematic diagram;
Fig. 2 is the flow chart of the dynamic memory pool monitoring method of Nucleus system of the present invention;
Fig. 3 is that memory pool information of the present invention summarizes monitoring function implementation flow chart;
Fig. 4 is that memory pool information summarizes monitoring instance graph in the present invention;
Fig. 5 is memory pool distribution condition monitoring function implementation flow chart in the present invention;
Fig. 6 is USYSYMEM memory pool distribution condition monitoring instance graph of the present invention;
Fig. 7 is memory pool fragment monitoring function implementation flow chart in the present invention;
Fig. 8 is DM_GWS memory pool chip distribution monitoring instance graph of the present invention;
Fig. 9 is DM_GWS memory pool fragment ratio monitoring instance graph of the present invention;
Figure 10 is the out-of-limit monitoring function implementation flow chart of memory in the present invention;
Figure 11 is the out-of-limit monitoring instance graph of GW_DM memory of the present invention;
Figure 12 is memory overflow monitoring function implementation flow chart of the present invention;
Figure 13 is espdrv memory overflow monitoring instance graph;
Figure 14 is the structure chart of the dynamic memory pool monitoring device of Nucleus system of the present invention.
Specific embodiment
A specific embodiment of the invention is further described with reference to the accompanying drawing.
The embodiment of the dynamic memory pool monitoring method of Nucleus system of the present invention
The dynamic memory pool monitoring method of the present embodiment passes through symbol resolution based on the symbol resolution of memory pool variable To determine the address of Nucleus system dynamic memory pool chained list and its structural information of chained list node, memory pool control block and interior The structural information of the structural bodies such as counterfoil header structure;Then dynamic memory pool chained list and memory pool are obtained by directly reading memory The actual value of control block structural body member obtains the currently used situation of dynamic memory pool;Further read memory block header structure Information, to understand the distribution and service condition of each memory block in specified memory pond in more detail.The implementation process of this method As shown in Fig. 2, wherein each functional module includes that the monitoring of memory pool information, the memory pool distribution monitoring of information, memory pool are broken The monitoring of the monitoring of piece information, memory out-of-limit monitoring and memory overflow, other than the monitoring of memory pool information, remaining monitoring It can be selected, each process is described in detail as needed below with reference to specific example.
Accurately and effectively obtain the operation information of dynamic memory pool chained list, memory pool control block and memory block header structure chained list It is the premise realized to memory pool monitoring, the acquisition of these information can be realized directly by rdma read, and the present invention is using symbol The mode of number parsing obtains the initial address of dynamic memory pool chained list and its data type of each member of chained list node and interior Deposit pond control block and its build structure type and its member data type.
Symbol resolution, which refers to, connects the definition and reference of symbol, and a critical function of symbol resolution is exactly basis Designation parses its specific information, data type and address such as variable, the initial address of function and end address, structure The information such as the member Name of body and type, symbol include global variable, static variable, function, type, Label etc..Nucleus System dynamic memory pool variable symbol information is stored in the specific position of file destination, the i.e. symbol table of ELF file, the invented party Method loads the ELF file comprising required symbol first, then searches symbol in the symbol table of ELF file according to designation Data type and memory address directly acquire its data type and memory address for simple variable, for structural body etc. Data type that aleatory variable then needs further analytic structure body member and structural body member are relative to structural body initial address Memory address offset.Then Nucleus system dynamic memory pool chained list initial address, the type structure of chained list node letter are obtained Then the member type of breath and memory pool control block structural body traverses dynamic memory pool chained list, obtains each memory pool control block Memory address, in offset and member type according to each member of memory pool control block relative to its initial address directly read It deposits, to obtain the actual value of each dynamic memory pool information.
For this example, as shown in figure 3, loading Nucleus aims of systems file first, then obtained by symbol resolution Take the dynamic memory pool address chained list DMD_Created_Pools_List and structural information and memory pool control block DM_PCB_ The structural information of STRUCT structural body stores offset value of the member of DM_PCB_STRUCT relative to structural body first address;Root According to the address of dynamic memory pool chained list DMD_Created_Pools_List, with can knowing the beginning of first dynamic memory pool Location, which is also dynamic memory pool control block address, according to memory pool control block structural body DM_PCB_STRUCT member's phase Its memory value is directly read for the offset of memory pool control block address, the relevant information of the memory pool can be obtained, then will Title, address, gross space, remaining space and the hang-up number of tasks of the memory pool of reading insert table, just complete first in this way The Information Statistics of a memory pool.Then global memory pool's chained list DMD_Created_Pools_List is moved to next node, reads It takes the information of second dynamic memory pool and inserts table, which repeats, until having read all dynamic memory pool letters It ceases and completion of filling in a form, result is as shown in Figure 4.
After the completion of memory pool information monitoring, memory pool distribution information, memory pool fragment can be believed according to user's actual need Breath, memory is out-of-limit and memory overflow is monitored.
1. the monitoring of memory pool distribution information.
Memory pool distributes information monitoring process are as follows: traversal dynamic memory pool chained list obtains the memory build knot in specified memory pond The initial address of structure chained list obtains memory block header structure structural body member type by symbol resolution, then traverses memory build Structure chained list directly reads memory, obtains the memory block distribution condition in specified memory pond, realizes the prison to memory pool distribution information It surveys.
For this example, as shown in figure 5, traversing dynamic memory pool first after having selected a particular memory pond Chained list searches the memory pool, then by memory pool initial address in memory pool control block structural body DM_PCB_STRUCT, finds Then the memory pool traverses the memory block header structure chained list of the memory pool, inquires the size of each memory block, and count identical big The quantity of small memory block, and these information are inserted into corresponding table, as a result as shown in Figure 6.
2. the monitoring of memory pool fragment information.
Memory pool fragment information monitoring process are as follows: the memory block header structure chained list in traversal specified memory pond is analyzed in each Counterfoil uses and idle condition, the size of memory fragmentation and its position in memory pool is recorded, to obtain memory fragmentation Size and distribution.
For specified memory pool, this example using monitoring process as shown in fig. 7, by the way of first, in accordance in step 1 The memory pool is found, the memory block header structure chained list of the memory pool, audit memory block occupancy situation are then traversed, residue can use sky Between information, and can not storage allocation distribution situation, i.e. the distribution situation of memory fragmentation.It checks, can incite somebody to action in order to facilitate user The distribution situation of fragment is showed in the form of pie chart and memory fragmentation distribution map, and pie chart can be intuitive to see in memory pool The accounting of memory fragmentation, memory fragmentation distribution map can be intuitive to see distribution situation of the memory fragmentation in memory pool, knot Fruit is as shown in Figure 8, Figure 9.
3. the out-of-limit monitoring of memory.
The out-of-limit monitoring process of memory are as follows: the memory block header structure chained list in traversal specified memory pond checks each memory build The correctness that the correctness and memory block header structure pointer of structure member is directed toward, to judge whether there is in memory overwriting Deposit leakage monitoring.Judge that memory block header structure data member correctness is to judge that memory block idle state identifies correctness, if empty Not busy status indicator value is Boolean, then it is assumed that control block idle state mark is correct;It is straight for judging that chain table pointer is directed toward correctness It connects and reads the current memory control block upper memory block pointer of direction and affiliated memory pool pointer, if two pointers are directed toward in corresponding Counterfoil and memory pool, then it is assumed that chain table pointer is directed toward correct.When memory block free mark and memory block header structure pointer are directed toward When correct, then it is assumed that the memory block is not out-of-limit, otherwise it is assumed that the memory pool has that memory is out-of-limit.
For specified memory pool, the monitoring process that this example uses is as shown in Figure 10, first, in accordance with the mode in step 1 The memory pool is found, the memory block header structure chained list of memory pool is then traversed, checks in all memory block header data structures The correctness that the correctness and chain table pointer of data member are directed toward, for the head that detection is abnormal, by the memory block header structure Information and a upper normal memory block header structure information insert table, and result is as shown in figure 11.
4. memory overflow monitors.
Memory overflow monitoring process are as follows: real-time monitoring memory pool available space size, according to available memory space size Variation tendency is to determine whether there are memory overflows.
For this example, the monitoring process of memory overflow is as shown in figure 12, for specified memory pond, passes through traversal dynamic Memory pool chained list finds the memory pool control block, and it is big according to specified time interval to read the memory pool available space by timer It is small, when memory pool available space is changed over time in the trend gradually decreased, it can conclude that there are memories to let out for the memory pool The case where leakage.It observes whether memory overflow occur in order to facilitate user is more intuitive, available space can be drawn and account for gross space The curve that changes over time of percentage, result is as shown in figure 13.
By the above process, the present invention can quickly and conveniently obtain its dynamic memory in Nucleus system operation Pond distribution and service condition can monitor that memory fragmentation is distributed, memory is out-of-limit and memory by memory pool distribution and service condition Leakage situation, to make the service condition and its health status of the more intuitive accurate understanding system current memory of Nucleus user.
The embodiment of the dynamic memory pool monitoring device of Nucleus system of the present invention
The above method can be used as a kind of computer program, transport in the dynamic memory pool monitoring device of Nucleus system Row, the dynamic memory pool monitoring device of Nucleus system of the invention are the equipment that computer etc. has data-handling capacity, should Determining device includes: memory, processor and network module.Memory, processor and network module between each other directly or It is electrically connected indirectly, to realize the transmission or interaction of data.For example, these elements between each other can be logical by one or more It interrogates bus or signal wire is realized and is electrically connected.Memory includes that at least one can be deposited in the form of software or firmware (firmware) The software function module being stored in memory, the software program and module that processor is stored in memory by operation, from And perform various functions application and data processing, i.e., in the dynamic of the Nucleus system in realization embodiment of the present invention method Deposit pond monitoring method.
Wherein, memory may be, but not limited to, random access memory (Random Access Memory, RAM), Read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc.. Wherein, memory is for storing program, and processor executes above procedure after receiving and executing instruction.
Processor may be a kind of IC chip, the processing capacity with signal.Above-mentioned processor can be logical With processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc..Can also be digital signal processor (DSP)), specific integrated circuit (ASIC), field programmable gate Array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.It can be real Now or execute the embodiment of the present invention disclosed in each method, step and logic diagram.General processor can be microprocessor Or the processor is also possible to any conventional processors etc..
Network module (being also communication module) is used to establish by network logical between electronic equipment and external communications terminals The transmitting-receiving operation of network signal and data is realized in letter connection.Above-mentioned network signal may include wireless signal or wire signal.
For this example, as shown in figure 14, program performed by processor includes symbol resolution module, memory pool information Monitoring modular, Memory Allocation monitoring modular, chip distribution monitoring modular, the out-of-limit monitoring modular of memory and memory overflow monitor mould Block obtains Nucleus system dynamic memory pool chained list initial address by symbol resolution module, the type structure of chained list node is believed The structural information of breath, memory pool control block structural body and memory block header structure body;Pass through memory pool information monitoring module, memory point It realizes with monitoring modular, chip distribution monitoring modular, the out-of-limit monitoring modular of memory and memory overflow monitoring modular to dynamic memory The case where pond, is monitored, and Nucleus user is made accurately to understand the service condition and its health status of system current memory.

Claims (9)

1. a kind of dynamic memory pool monitoring method of Nucleus system, which is characterized in that the monitoring method the following steps are included:
1) by symbol resolution obtain Nucleus system dynamic memory pool chained list initial address, chained list node type information, with And the member type of memory pool control block structural body;
2) dynamic memory pool chained list is traversed, the memory address of each memory pool control block is obtained;
3) memory is directly read according to the offset of each member's relative origin of memory pool control block and member type, to obtain Title, address, gross space, remaining space and the hang-up number of tasks of each dynamic memory pool, realize the monitoring of each memory pool information.
2. the dynamic memory pool monitoring method of Nucleus system according to claim 1, which is characterized in that this method is also Monitoring including memory pool distribution information, process are as follows: traversal dynamic memory pool chained list obtains the memory build knot in specified memory pond The initial address of structure chained list carries out the memory block header structure chained list according to the initial address of obtained memory block header structure chained list Traversal, obtains the size of each memory block in the specified memory pond, and count the quantity of same size memory block.
3. the dynamic memory pool monitoring method of Nucleus system according to claim 1, which is characterized in that this method is also Including the monitoring to memory pool fragment information, process are as follows: traversal dynamic memory pool chained list obtains the memory build in specified memory pond The initial address of structure chained list, according to the initial address of obtained memory block header structure chained list to the memory block header structure chained list into Row traversal determines the distribution situation of each memory block use and idle condition and memory fragmentation.
4. the dynamic memory pool monitoring method of Nucleus system according to claim 1, which is characterized in that this method is also Including the monitoring out-of-limit to memory pool, process are as follows: traversal dynamic memory pool chained list obtains the memory block header structure in specified memory pond The initial address of chained list, according to the initial address of obtained memory block header structure chained list to memory block header structure chained list progress time It goes through, the correctness that data member correctness and chain table pointer in all memory block header data structures are directed toward is checked, if just Really, then illustrate that the memory pool is not out-of-limit.
5. the dynamic memory pool monitoring method of Nucleus system according to claim 4, which is characterized in that judge memory Build structured data member's correctness is to judge that memory block idle state identifies correctness, if idle state ident value is boolean Value, then it is assumed that control block idle state mark is correct;Judging that chain table pointer is directed toward correctness is to directly read current memory control Block is directed toward a upper memory block pointer and affiliated memory pool pointer, if two pointers are directed toward corresponding memory block and memory pool, recognizes It is directed toward for chain table pointer correct.
6. the dynamic memory pool monitoring method of Nucleus system according to claim 1, which is characterized in that this method is also Including the monitoring leaked memory pool, process are as follows: traversal dynamic memory pool chained list finds the memory pool control block in specified memory pond, The memory pool available space size is read according to setting time interval, determines that available space accounts for gross space percentage and changes over time Situation, when memory pool available space is changed over time in trend is gradually reduced, determining the memory pool, there are the feelings of memory overflow Condition.
7. the dynamic memory pool monitoring method of Nucleus system according to claim 3, which is characterized in that memory pool The monitoring of fragment information further includes showing the distribution situation of memory fragmentation by way of pie chart and distribution map.
8. the dynamic memory pool monitoring method of Nucleus system according to claim 6, which is characterized in that memory pool The monitoring of leakage further includes available space is accounted for gross space percentage changing over time situation to show by way of Dynamic Graph Come.
9. a kind of dynamic memory pool monitoring device of Nucleus system, which is characterized in that the monitoring device includes processor and deposits Reservoir and storage on a memory and the computer program that can run on a processor, the processor execution computer The dynamic memory pool monitoring method of Nucleus system of any of claims 1-8 is realized when program.
CN201811223950.5A 2018-10-19 2018-10-19 Dynamic memory pool monitoring method and device for Nucleus system Active CN109471771B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811223950.5A CN109471771B (en) 2018-10-19 2018-10-19 Dynamic memory pool monitoring method and device for Nucleus system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811223950.5A CN109471771B (en) 2018-10-19 2018-10-19 Dynamic memory pool monitoring method and device for Nucleus system

Publications (2)

Publication Number Publication Date
CN109471771A true CN109471771A (en) 2019-03-15
CN109471771B CN109471771B (en) 2022-01-04

Family

ID=65663995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811223950.5A Active CN109471771B (en) 2018-10-19 2018-10-19 Dynamic memory pool monitoring method and device for Nucleus system

Country Status (1)

Country Link
CN (1) CN109471771B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814049A (en) * 2010-03-23 2010-08-25 北京大学 Memory leak detection method
US20110153908A1 (en) * 2009-12-23 2011-06-23 Intel Corporation Adaptive address mapping with dynamic runtime memory mapping selection
CN102789407A (en) * 2012-06-18 2012-11-21 上海斐讯数据通信技术有限公司 Validity detection method of memory block
US20140372723A1 (en) * 2013-06-14 2014-12-18 International Business Machines Corporation Dynamically optimizing memory allocation across virtual machines
CN105718319A (en) * 2016-02-23 2016-06-29 中国科学院微电子研究所 Memory pool territory analysis method and memory pool device
CN106855788A (en) * 2015-12-09 2017-06-16 北京信威通信技术股份有限公司 A kind of Memory Allocation management method of heap space
CN108132842A (en) * 2017-12-15 2018-06-08 天津津航计算技术研究所 A kind of embedded software internal storage management system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153908A1 (en) * 2009-12-23 2011-06-23 Intel Corporation Adaptive address mapping with dynamic runtime memory mapping selection
CN101814049A (en) * 2010-03-23 2010-08-25 北京大学 Memory leak detection method
CN102789407A (en) * 2012-06-18 2012-11-21 上海斐讯数据通信技术有限公司 Validity detection method of memory block
US20140372723A1 (en) * 2013-06-14 2014-12-18 International Business Machines Corporation Dynamically optimizing memory allocation across virtual machines
CN106855788A (en) * 2015-12-09 2017-06-16 北京信威通信技术股份有限公司 A kind of Memory Allocation management method of heap space
CN105718319A (en) * 2016-02-23 2016-06-29 中国科学院微电子研究所 Memory pool territory analysis method and memory pool device
CN108132842A (en) * 2017-12-15 2018-06-08 天津津航计算技术研究所 A kind of embedded software internal storage management system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘娟等: "一种跨平台内存池的设计与实现", 《蚌埠学院学报》 *
刘小燕等: "嵌入式装置内存泄漏检测系统的设计与实现", 《电子设计工程》 *
姬希娜等: "Nucleus PLUS的动态内存管理机制研究", 《单片机与嵌入式系统应用》 *

Also Published As

Publication number Publication date
CN109471771B (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN100533398C (en) Debug information collection method and debug information collection system
CN112988679B (en) Log acquisition control method and device, storage medium and server
CN112363886B (en) Database monitoring method, system, terminal and storage medium
US20220138012A1 (en) Computing Resource Scheduling Method, Scheduler, Internet of Things System, and Computer Readable Medium
CN111651595A (en) Abnormal log processing method and device
CN109981737A (en) A kind of processing method of network request, device, terminal and storage medium
CN114896166A (en) Scene library construction method and device, electronic equipment and storage medium
CN109828790A (en) A kind of data processing method and system based on Shen prestige isomery many-core processor
CN110503297B (en) Service scene acquisition method and device, electronic equipment and medium
CN110018932B (en) Method and device for monitoring container magnetic disk
CN109992408B (en) Resource allocation method, device, electronic equipment and storage medium
CN104765792A (en) Dimension data storing method, device and system
CN109634740A (en) EMS memory management process and device
CN107092556B (en) Test method, device and equipment
CN109471771A (en) A kind of the dynamic memory pool monitoring method and device of Nucleus system
CN107357740A (en) One kind serializing device method of automatic configuration, device and distributed cache system
US8250243B2 (en) Diagnostic data collection and storage put-away station in a multiprocessor system
RU2532714C2 (en) Method of acquiring data when evaluating network resources and apparatus therefor
CN116645082A (en) System inspection method, device, equipment and storage medium
CN109767546B (en) Quality checking and scheduling device and quality checking and scheduling method for valuable bills
CN114138499B (en) GPU resource utilization rate monitoring method and device, computer equipment and medium
CN113238911B (en) Alarm processing method and device
CN106326094B (en) Check the method and system of pointer exception
CN112446501B (en) Method, device and system for acquiring cache allocation model in real network environment
CN114201363A (en) System protection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant