CN109471771B - Dynamic memory pool monitoring method and device for Nucleus system - Google Patents

Dynamic memory pool monitoring method and device for Nucleus system Download PDF

Info

Publication number
CN109471771B
CN109471771B CN201811223950.5A CN201811223950A CN109471771B CN 109471771 B CN109471771 B CN 109471771B CN 201811223950 A CN201811223950 A CN 201811223950A CN 109471771 B CN109471771 B CN 109471771B
Authority
CN
China
Prior art keywords
memory
memory pool
pool
linked list
monitoring
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.)
Active
Application number
CN201811223950.5A
Other languages
Chinese (zh)
Other versions
CN109471771A (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

Images

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 invention relates to a method and a device for monitoring a dynamic memory pool of a Nucleus system, belonging to the technical field of dynamic memory pool analysis. The invention is based on the symbolic analysis of the memory pool variable, the dynamic memory pool linked list address of the Nucleus system, the structural information of linked list nodes and the member information of a memory pool control block structure are determined through the symbolic analysis, and the information of each dynamic memory pool can be obtained by directly reading the memory through the information. The invention can quickly and conveniently realize the monitoring of the dynamic memory pool information of the Nucleus system in the running process, so that a Nucleus user can accurately know the use condition of the current memory of the system.

Description

Dynamic memory pool monitoring method and device for Nucleus system
Technical Field
The invention relates to a method and a device for monitoring a dynamic memory pool of a Nucleus system, belonging to the technical field of dynamic memory pool analysis.
Background
The Nucleus operating system is a preemptive, multitasking operating system designed for real-time embedded applications, with 95% of the code written in ANSIC, and is therefore very portable and capable of supporting most types of processors. Meanwhile, the nucleous system has a plurality of advantages, such as: the method has the advantages of providing source codes, high cost performance, easiness in learning and use, rich functional modules and the like, and the method enables the Nucleus system to be widely applied to various fields, such as: networks, routing, data communications, automotive, medical instrumentation, security, industrial control, satellite communications, etc.
Dynamic memory allocation is widely applied to a Nucleus system, the dynamic memory allocation is generally realized based on a dynamic memory management module of the Nucleus operating system, some dynamic memory allocation is directly carried out in a global memory pool of the Nucleus operating system, and other dynamic memory allocation is realized by an application module in a special memory pool created by the Nucleus memory management. However, the allocation, release and storage of the memory are not visible to the user of the nuclear system, and the use and health of the memory are unknown. As the scale of the memory blocks is allocated according to the needs by dynamic memory allocation, with the continuous allocation and release of the memory blocks, a part of the memory blocks will have a finely-divided memory space which cannot be allocated, namely memory fragments, and the accumulation of the memory fragments over time will gradually cause the low operating efficiency of the system; if there is a memory leak, a memory exhaustion will occur over time, resulting in a system crash restart. If the use condition and the health condition of the memory in the system operation process can be discovered as early as possible, measures can be taken as early as possible to optimize the use of the memory, so that the potential risk during the system operation process is avoided. Therefore, the running state and the health condition of the system can be intuitively known by monitoring the running state of the dynamic memory pool of the Nucleus system, and the method has great significance for the stable running of the Nucleus system.
The structure of the dynamic memory pool in the nucleous system is shown in fig. 1, and the nucleous system maintains and manages the dynamic memory pool through a dynamic memory pool control block linked List DMD _ Created _ Pools _ List. When the system generates a dynamic memory pool, a dynamic memory pool control block related to the memory pool is synchronously created, and the memory pool control block stores the name, address, scale, available space, minimum allocation space, memory block linked list address, suspension waiting task and other information of the dynamic memory pool. The dynamic memory pool control block is added into the linked list of the memory pool control block after being created, so that the system can find the memory pool and manage the memory pool through the linked list of the dynamic memory pool control block.
For each appointed dynamic memory pool, the system maintains and manages the dynamic memory pool through a memory block head structure list dm _ memory _ list. Each system allocates a dynamic memory block, and a memory block head structure related to the memory block is synchronously created, and the memory block head structure stores the idle state of the memory block, the memory pool pointer to which the memory block belongs, and the head structure pointers of the previous memory block and the next memory block connected to the memory block. After the memory block head structure is created, the memory block head structure is added to the memory block head structure linked list of the corresponding memory pool.
Therefore, the memory pool control block stores macro information of the memory pool, and the memory block head structure linked list describes the specific allocation condition of the specified memory pool in more detail, so to monitor the dynamic memory pool of the nuclear system specifically, the operation information of the dynamic memory pool linked list, the memory pool control block and the memory block head structure linked list needs to be acquired accurately and effectively. However, the lack of real-time monitoring of the dynamic memory pool of the nucleous system in the prior art results in that the nucleous system cannot know the use condition of the dynamic memory pool in time.
Disclosure of Invention
The invention aims to provide a method for monitoring a dynamic memory pool of a Nucleus system, which is used for realizing the real-time monitoring of the dynamic memory pool of the Nucleus system; the invention also provides a dynamic memory pool monitoring device of the Nucleus system.
The invention provides a method for monitoring a dynamic memory pool of a Nucleus system for solving the technical problem, which comprises the following steps:
1) obtaining the initial address of a dynamic memory pool linked list of a Nucleus system, the type information of linked list nodes and the member type of a memory pool control block structure body through symbol analysis;
2) traversing the dynamic memory pool linked list to obtain the memory address of each memory pool control block;
3) and directly reading the memory according to the offset of each member relative to the initial address and the member type of the memory pool control block to obtain the name, the address, the total space, the residual space and the number of the suspended tasks of each dynamic memory pool, thereby realizing the monitoring of the information of each memory pool.
The invention is based on the symbolic analysis of the memory pool variable, the dynamic memory pool linked list address of the Nucleus system, the structural information of linked list nodes and the member information of a memory pool control block structure are determined through the symbolic analysis, and the information of each dynamic memory pool can be obtained by directly reading the memory through the information. The invention can quickly and conveniently realize the monitoring of the dynamic memory pool information of the Nucleus system in the running process, so that a Nucleus user can accurately know the use condition of the current memory of the system.
Further, in order to facilitate the nucleous user to accurately know the allocation and use of each memory block in the memory pool, the method further comprises monitoring the allocation information of the memory pool, and the process is as follows: traversing the dynamic memory pool linked list to obtain the initial address of the head structure linked list of the memory blocks of the appointed memory pool, traversing the head structure linked list of the memory blocks according to the obtained initial address of the head structure linked list of the memory blocks, obtaining the size of each memory block in the appointed memory pool, and counting the number of the memory blocks with the same size.
Further, in order to facilitate the nucleous user to accurately know the distribution of the memory fragments in the memory pool, the method further comprises monitoring the information of the memory pool fragments, and the process is as follows: and traversing the dynamic memory pool linked list to acquire the initial address of the head structure linked list of the memory block of the appointed memory pool, traversing the head structure linked list of the memory block according to the acquired initial address of the head structure linked list of the memory block, and determining the use and idle conditions of each memory block and the distribution condition of memory fragments.
Further, in order to facilitate the nucleous user to accurately know the out-of-limit condition of the memory pool, the method further comprises the step of monitoring the out-of-limit condition of the memory pool, and the process is as follows: traversing the dynamic memory pool linked list to obtain the initial address of the head structure linked list of the memory block of the appointed memory pool, traversing the head structure linked list of the memory block according to the obtained initial address of the head structure linked list of the memory block, checking the correctness of data members in the head data structures of all the memory blocks and the correctness of pointer directions of linked lists, and if the data members are both correct, indicating that the memory pool is not out of limit.
Furthermore, in order to realize the judgment of the correctness of the data members in the head data structure of the memory block and the correctness of the pointing direction of the linked list pointer, the invention also provides a specific judgment mode, the judgment of the correctness of the head structural data members of the memory block is the judgment of the correctness of the idle state identifier of the memory block, and if the idle state identifier value is a Boolean value, the idle state identifier of the control block is considered to be correct; and judging the pointing correctness of the linked list pointer is to directly read the pointer pointing to the previous memory block and the pointer of the memory pool of the current memory control block, and if the two pointers point to the corresponding memory block and the memory pool, the linked list pointer is considered to point correctly.
Further, in order to facilitate the nucleous user to accurately know the memory leakage condition of the memory pool, the method further comprises the step of monitoring the memory pool leakage, and the process is as follows: traversing the dynamic memory pool linked list to find out the memory pool control block of the memory pool, reading the size of the available space of the memory pool according to a set time interval, determining the change condition of the percentage of the available space in the total space along with time, and judging the memory leakage condition of the memory pool when the change of the available space of the memory pool along with time is in a gradually decreasing trend.
Further, in order to enable the nucleous user to visually see the distribution of the memory fragments, the monitoring of the memory pool fragment information further includes displaying the distribution of the memory fragments in a pie chart and a distribution graph.
Further, in order to enable a nucleous user to visually see whether the memory pool has leakage, the monitoring of the leakage of the memory pool further comprises displaying the change of the percentage of the available space in the total space with time in a dynamic graph.
The invention also provides a device for monitoring the dynamic memory pool of the Nucleus system, which comprises a processor, a memory and a computer program which is stored on the memory and can be operated on the processor, wherein the dynamic memory pool monitoring method of the Nucleus system is realized when the processor executes the computer program.
Drawings
FIG. 1 is a schematic diagram of a dynamic memory pool structure of a conventional Nucleus system;
FIG. 2 is a flow chart of a dynamic memory pool monitoring method of the Nucleus system according to the present invention;
FIG. 3 is a flow chart of the implementation of the memory pool information gathering monitoring function of the present invention;
FIG. 4 is a diagram of an example of monitoring and summarizing memory pool information in the present invention;
FIG. 5 is a flow chart of the implementation of the memory pool allocation monitoring function in the present invention;
FIG. 6 is a diagram of an example of USYSYMEM memory pool allocation monitoring of the present invention;
FIG. 7 is a flow chart of the implementation of the fragmentation monitoring function of the memory pool in the present invention;
fig. 8 is a diagram of an example of monitoring the DM _ GWS memory pool fragmentation distribution according to the present invention;
fig. 9 is a diagram of an example of monitoring the fragmentation ratio of the DM _ GWS memory pool according to the present invention;
FIG. 10 is a flow chart of the memory out-of-limit monitoring function implementation of the present invention;
FIG. 11 is a diagram of an example of GW _ DM memory out-of-limit monitoring according to the present invention;
FIG. 12 is a flow chart of the implementation of the memory leak monitoring function of the present invention;
FIG. 13 is a diagram of an example of espdrv memory leak monitoring;
fig. 14 is a structural diagram of a dynamic memory pool monitoring device of the nucleous system according to the present invention.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings.
Embodiment of the dynamic memory pool monitoring method of the Nucleus system
The dynamic memory pool monitoring method of the embodiment is based on the symbol analysis of the memory pool variable, and the address of the dynamic memory pool linked list of the Nucleus system and the structure information of linked list nodes thereof, the structure information of structures such as a memory pool control block, a memory block head structure and the like are determined through the symbol analysis; then, the actual values of the dynamic memory pool linked list and the structural member of the memory pool control block are obtained by directly reading the memory to obtain the current use condition of the dynamic memory pool; and further reading the information of the structure of the memory block head, so that the distribution and the use condition of each memory block in the appointed memory pool can be known in more detail. The implementation flow of the method is shown in fig. 2, wherein each functional module includes monitoring of memory pool information, monitoring of memory pool allocation information, monitoring of memory pool fragmentation information, monitoring of memory out-of-limit, and monitoring of memory leakage, and other monitoring may be selected as needed except for monitoring of memory pool information, and each process is described in detail below with reference to specific examples.
The invention adopts the symbol analysis mode to obtain the initial address of the dynamic memory pool linked list and the data type of each member of the linked list nodes, the data type of the memory pool control block and the block head structure type and the member data type thereof.
The symbol analysis refers to the connection of the definition and the reference of a symbol, and an important function of the symbol analysis is to analyze specific information of the symbol according to the name of the symbol, such as the data type and the address of a variable, the starting address and the ending address of a function, the name and the type of a member of a structure and the like, wherein the symbol comprises a global variable, a static variable, a function, a type, a Label and the like. The method comprises the steps of firstly loading an ELF file containing a required symbol, then searching the data type and the memory address of the symbol in the symbol table of the ELF file according to the symbol name, directly acquiring the data type and the memory address of a simple variable, and further analyzing the data type of a structural body member and the memory address offset of the structural body member relative to the initial address of the structural body for complex variables such as the structural body. Then, the initial address of the dynamic memory pool linked list of the Nucleus system, the type structure information of linked list nodes and the member type of the memory pool control block structure are obtained, then the dynamic memory pool linked list is traversed to obtain the memory address of each memory pool control block, and the memory is directly read according to the offset of each member of the memory pool control block relative to the initial address and the member type, so that the actual value of each dynamic memory pool information is obtained.
For this example, as shown in fig. 3, a nucleos system target file is loaded first, and then the address and the structure information of a dynamic memory pool linked List DMD _ Created _ tools _ List and the structure information of a memory pool control block DM _ PCB _ STRUCT structure are obtained through symbol analysis, and the offset value of the member of the DM _ PCB _ STRUCT relative to the structure head address is stored; according to the address of DMD _ Created _ Pools _ List, the starting address of the first dynamic memory pool can be known, the address is also the address of the dynamic memory pool control block, the memory value of the member of DM _ PCB _ STRUCT of the memory pool control block is directly read according to the offset of the member relative to the address of the memory pool control block, the relevant information of the memory pool can be obtained, and then the read name, address, total space, residual space and the number of suspended tasks of the memory pool are filled into a table, so that the information statistics of the first memory pool is completed. Then, the global memory pool linked List DMD _ Created _ Pools _ List is moved to the next node, the information of the second dynamic memory pool is read and filled into the table, and the process is repeated until all the information of the dynamic memory Pools is read and the table filling is completed, with the result shown in fig. 4.
After the monitoring of the memory pool information is completed, the memory pool allocation information, the memory pool fragment information, the memory out-of-limit and the memory leakage can be monitored according to the actual requirements of users.
1. And monitoring the memory pool allocation information.
The monitoring process of the memory pool allocation information comprises the following steps: traversing the dynamic memory pool linked list to obtain the initial address of the head structural linked list of the memory block of the appointed memory pool, obtaining the member type of the head structural body of the memory block through symbol analysis, then traversing the head structural linked list of the memory block, directly reading the memory, obtaining the memory block distribution condition of the appointed memory pool, and realizing the monitoring of the distribution information of the memory pool.
For this example, as shown in fig. 5, after a specific memory pool is selected, first traverse the dynamic memory pool linked list to find the memory pool, then find the memory pool by the starting address of the memory pool in the memory pool control block structure DM _ PCB _ STRUCT, then traverse the memory block head structured list of the memory pool, query the size of each memory block, count the number of memory blocks with the same size, and fill the information into the corresponding table, and the result is shown in fig. 6.
2. And monitoring the fragment information of the memory pool.
The monitoring process of the memory pool fragment information comprises the following steps: and traversing the memory block head structure linked list of the appointed memory pool, analyzing the use and idle conditions of each memory block, and recording the size and the position of the memory fragments in the memory pool so as to acquire the size and the distribution of the memory fragments.
For the specified memory pool, the monitoring process adopted in this example is as shown in fig. 7, and the memory pool is first found in the manner in step 1, and then the memory block head structure linked list of the memory pool is traversed to query the memory block occupation condition, the remaining available space information, and the distribution condition of the unallocated memory, that is, the distribution condition of the memory fragments. For the convenience of the user to check, the distribution of the fragments may be presented in the form of a pie chart and a memory fragment distribution chart, the pie chart may visually see the proportion of the memory fragments in the memory pool, and the memory fragment distribution chart may visually see the distribution of the memory fragments in the memory pool, with the results shown in fig. 8 and 9.
3. And monitoring the out-of-limit of the memory.
The memory out-of-limit monitoring process comprises the following steps: and traversing the memory block head structure linked list of the appointed memory pool, and checking the correctness of each memory block head structure member and the correctness of the pointing of the memory block head structure pointer, thereby judging whether the memory out-of-range memory leakage monitoring exists or not. Judging the correctness of the structural data members of the memory block head is to judge the correctness of the idle state identification of the memory block, and if the idle state identification value is a Boolean value, considering that the idle state identification of the control block is correct; and judging the pointing correctness of the linked list pointer is to directly read the pointer pointing to the previous memory block and the pointer of the memory pool of the current memory control block, and if the two pointers point to the corresponding memory block and the memory pool, the linked list pointer is considered to point correctly. When the idle identification of the memory block and the pointer of the head structure of the memory block point to the correct point, the memory block is considered not to be out of limit, otherwise, the memory pool is considered to have the condition of out of limit of the memory.
For the designated memory pool, the monitoring process adopted in this example is as shown in fig. 10, the memory pool is first found in the manner in step 1, then the memory block head structure linked list of the memory pool is traversed, the correctness of the data members in the head data structures of all the memory blocks and the correctness of the pointer pointing of the linked list are checked, for the head detected to be abnormal, the head structure information of the memory block and the head structure information of the previous normal memory block are filled into the table, and the result is as shown in fig. 11.
4. And monitoring memory leakage.
The memory leakage monitoring process comprises the following steps: and monitoring the size of the available space of the memory pool in real time, and judging whether memory leakage exists according to the change trend of the size of the available memory space.
For this example, the monitoring process of the memory leak is as shown in fig. 12, for a specified memory pool, the memory pool control block is found by traversing the dynamic memory pool linked list, the size of the available space of the memory pool is read by the timer according to a specified time interval, and when the available space of the memory pool changes gradually with time, the situation that the memory leak exists in the memory pool can be determined. In order to make a user more intuitively observe whether the memory leak occurs, a curve of the percentage of the available space to the total space, which varies with time, may be drawn, and the result is shown in fig. 13.
Through the process, the dynamic memory pool allocation and use conditions of the system in the operation process of the Nucleus system can be quickly and conveniently obtained, and the memory fragment distribution, the memory overrun and the memory leakage conditions can be monitored through the memory pool allocation and use conditions, so that a Nucleus user can know the use conditions and the health conditions of the current memory of the system more intuitively and accurately.
Embodiment of the invention relates to a dynamic memory pool monitoring device of a Nucleus system
The method can be used as a computer program and run on a dynamic memory pool monitoring device of a Nucleus system, the dynamic memory pool monitoring device of the Nucleus system is equipment with data processing capacity such as a computer, and the determining device comprises: memory, processor and network module. The memory, processor, and network module are electrically connected to each other, directly or indirectly, to enable transmission or interaction of data. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory comprises at least one software functional module which can be stored in the memory in a form of software or firmware (firmware), and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, namely, the method for monitoring the dynamic memory pool of the nucleous system in the method embodiment of the invention is realized.
The Memory may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory is used for storing programs, and the processor executes the programs after receiving the execution instructions.
The processor may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like. But may also be a Digital Signal Processor (DSP)), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The network module (also called as a communication module) is used for establishing communication connection between the electronic equipment and an external communication terminal through a network, so as to realize the transceiving operation of network signals and data. The network signal may include a wireless signal or a wired signal.
For this example, as shown in fig. 14, the program executed by the processor includes a symbol parsing module, a memory pool information monitoring module, a memory allocation monitoring module, a fragment distribution monitoring module, a memory out-of-limit monitoring module, and a memory leakage monitoring module, and the symbol parsing module is used to obtain a start address of a dynamic memory pool chain table of the nuclear system, type structure information of a chain table node, and structure information of a memory pool control block structure and a memory block header structure; the condition of the dynamic memory pool is monitored through the memory pool information monitoring module, the memory allocation monitoring module, the fragment distribution monitoring module, the memory out-of-limit monitoring module and the memory leakage monitoring module, so that a Nucleus user can accurately know the service condition and the health condition of the current memory of the system.

Claims (8)

1. A dynamic memory pool monitoring method of a Nucleus system is characterized by comprising the following steps:
1) obtaining the initial address of a dynamic memory pool linked list of a Nucleus system, the type information of linked list nodes and the member type of a memory pool control block structure body through symbol analysis;
2) traversing the dynamic memory pool linked list to obtain the memory address of each memory pool control block;
3) directly reading the memory according to the offset of each member relative to the initial address and the member type of the memory pool control block so as to obtain the name, the address, the total space, the residual space and the number of the suspended tasks of each dynamic memory pool and realize the monitoring of the information of each memory pool;
the method also comprises the monitoring of the fragment information of the memory pool, and the process is as follows: and traversing the dynamic memory pool linked list to acquire the initial address of the head structure linked list of the memory block of the appointed memory pool, traversing the head structure linked list of the memory block according to the acquired initial address of the head structure linked list of the memory block, and determining the use and idle conditions of each memory block and the distribution condition of memory fragments.
2. The method of claim 1, further comprising monitoring memory pool allocation information, the process comprising: traversing the dynamic memory pool linked list to obtain the initial address of the head structure linked list of the memory blocks of the appointed memory pool, traversing the head structure linked list of the memory blocks according to the obtained initial address of the head structure linked list of the memory blocks, obtaining the size of each memory block in the appointed memory pool, and counting the number of the memory blocks with the same size.
3. The method of claim 1, further comprising monitoring for a memory pool violation, the process comprising: traversing the dynamic memory pool linked list to obtain the initial address of the head structure linked list of the memory block of the appointed memory pool, traversing the head structure linked list of the memory block according to the obtained initial address of the head structure linked list of the memory block, checking the correctness of data members in the head data structures of all the memory blocks and the correctness of pointer directions of linked lists, and if the data members are both correct, indicating that the memory pool is not out of limit.
4. The method for monitoring the dynamic memory pool of the Nucleus system as claimed in claim 3, wherein the judgment of correctness of structural data members of the memory block head is to judge correctness of idle state identification of the memory block, and if the value of the idle state identification is a Boolean value, the idle state identification of the control block is considered to be correct; and judging the pointing correctness of the linked list pointer is to directly read the pointer pointing to the previous memory block and the pointer of the memory pool of the current memory control block, and if the two pointers point to the corresponding memory block and the memory pool, the linked list pointer is considered to point correctly.
5. The method of claim 1, further comprising monitoring for memory pool leakage by: and traversing the dynamic memory pool linked list to find out a memory pool control block of the appointed memory pool, reading the size of the available space of the memory pool according to a set time interval, determining the change condition of the percentage of the available space in the total space along with time, and judging the memory leakage condition of the memory pool when the change of the available space of the memory pool along with time is in a gradually decreasing trend.
6. The method of claim 1, wherein the monitoring of the fragmentation information of the memory pool further comprises displaying the distribution of the memory fragments in a pie chart or a distribution graph.
7. The method of claim 5 wherein monitoring for a pool leak further comprises displaying the percentage of available space to total space as a function of time in a dynamic graph.
8. A dynamic memory pool monitoring device of a nucleous system, which is characterized in that the monitoring device comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, and the processor implements the dynamic memory pool monitoring method of the nucleous system according to any one of claims 1 to 7 when executing the computer 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 CN109471771A (en) 2019-03-15
CN109471771B true 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)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8135936B2 (en) * 2009-12-23 2012-03-13 Intel Corporation Adaptive address mapping with dynamic runtime memory mapping selection
CN101814049A (en) * 2010-03-23 2010-08-25 北京大学 Memory leak detection method
CN102789407B (en) * 2012-06-18 2015-05-27 上海斐讯数据通信技术有限公司 Validity detection method of memory block
US9619378B2 (en) * 2013-06-14 2017-04-11 Globalfoundries Inc. 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
CN105718319B (en) * 2016-02-23 2019-03-15 中国科学院微电子研究所 Memory pool layout analysis method and memory pool device
CN108132842B (en) * 2017-12-15 2021-11-02 天津津航计算技术研究所 Embedded software memory management system

Also Published As

Publication number Publication date
CN109471771A (en) 2019-03-15

Similar Documents

Publication Publication Date Title
US8141053B2 (en) Call stack sampling using a virtual machine
CN108446171B (en) Electronic device, distributed system execution task allocation method and storage medium
JPH03189739A (en) Mechanism for measuring service time of software and hardware components
CN104182332A (en) Methods and devices for judging resource leakage and predicting resource use conditions
CN113672441B (en) Method and device for testing intelligent equipment
CN104572448A (en) Method and device for realizing use condition of thread stack
CN106407102B (en) Fuzzy testing method, device and system for application program
CN112231187B (en) Micro-service abnormity analysis method and device
CN110674047A (en) Software testing method and device and electronic equipment
US20170277466A1 (en) In-memory data analytic system that provides an integrated tracking mechanism for explicit memory resources
CN113127314B (en) Method and device for detecting program performance bottleneck and computer equipment
CN101452427A (en) DMA data-transmission system and method, and central processing unit
CN109471771B (en) Dynamic memory pool monitoring method and device for Nucleus system
CN112084024B (en) Memory monitoring method, device, medium and electronic equipment
CN109829014B (en) Method and device for acquiring test data
CN108197005B (en) Method, medium, equipment and system for monitoring bottom layer operation performance of IOS application
CN112463574A (en) Software testing method, device, system, equipment and storage medium
CN107273283B (en) Automatic software detection method and device
CN110971478A (en) Pressure measurement method and device for cloud platform service performance and computing equipment
CN111708670B (en) Method and device for determining task time parameters in real-time operation system and vehicle
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN114327981A (en) Safety verification system, method and device of function safety mechanism
CN114500334A (en) Diagnosis method and device of server application architecture
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN114691347A (en) Thread memory obtaining method and device, intelligent terminal 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