Unlock instant, AI-driven research and patent intelligence for your innovation.

Memory management method and system based on chain type stacking

A memory management and memory technology, applied in the information field, can solve problems such as crashes, system function confusion, and low probability of being exploited

Active Publication Date: 2015-08-19
南京龙门电子科技有限公司
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0031] This recycling mechanism of FreeRTOS must consider an important question: after the memory block is recycled, if there are several consecutive memory blocks, how to merge them? In fact, FreeRTOS does not consider the problem of memory consolidation. Then, as the system runs over time, a large amount of memory fragmentation will be generated. Finally, when a large-sized memory block is needed, the total amount of free memory is sufficient. Yes, but they are all very small fragments, which lead to memory allocation failure, which in turn causes system function confusion and even crashes
However, since the memory blocks are not merged, this idea will lead to a problem. Due to the continuous refinement of the small memory, there will be a large number of small blocks in front of the free list list, and these small blocks will be used as they become smaller and smaller. The probability will be lower and lower, then, when looking for a large free memory, there will be a lot of CPU time wasted scanning those small blocks
[0033] In addition, when releasing memory, neither uCOS-II nor FreeRTOS considered how to deal with an error pointer that is not a pointer to a valid dynamic memory block. system breakdown

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Memory management method and system based on chain type stacking
  • Memory management method and system based on chain type stacking
  • Memory management method and system based on chain type stacking

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0126] 1) The selected hardware platform can be a conventional development board with STM32F103RCT6 as the main control.

[0127] 2) The selected real-time kernel can be MadOS, whose characteristics fully match those of the chain stacking method.

[0128] 3) The driver layer needs to be provided according to specific applications.

[0129] Such as Figure 12 As shown, in practical applications, the content described in the above figure can be used as a complete platform for application developers to use. In this way, application developers do not need to care about various details in the kernel and drivers. Specifically in the present invention, application developers do not need to care about how the memory management module manages memory at all. They only need to make requirements for the memory management module, that is, Apply for a certain size of dynamic memory, and the memory management module will feed back a result to the upper application.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a memory management method used for real-time core. The memory management method includes inserting a structural body in front of each distributed dynamic memory in a memory stack to form a dynamic memory block so as to store information of the dynamic memory blocks; distributing new dynamic memories to the position as close as possible to the head of the memory stack in response to application of effective memory of an upper application for distribution of dynamic memory, that is, stacking the head of the memory stack to form the dynamic memory blocks; linking head addresses of all the dynamic memory blocks onto a single link list, and sequencing all elements in the single link list as the ascending order of the head addresses of the dynamic memory blocks; executing memory recovery operation in response to effective memory release indicators of the upper application, and releasing memory space of the corresponding dynamic memory blocks. By adopting the link stacking strategy, the distributed memory blocks are stacked to the head of the memory stack, and memory fragments are reduced. Meanwhile, use efficiency of dynamic memory during operation of the real-time core is improved.

Description

technical field [0001] The present invention relates to the field of information technology, about the dynamic memory management of computer systems, especially the memory management method and system used in embedded real-time kernels, suitable for systems with relatively limited performance and resources, such as the Real-time kernel MadOS for efficient memory management of embedded systems. Background technique [0002] In the field of embedded systems, uCOS-II and FreeRTOS are two very typical real-time kernels, and the memory management method is also very representative. [0003] 1. Memory management in uCOS-II [0004] uCOS-II has always been known for its stability in the field of embedded systems, and it was once used in the lunar rover of the United States. An important reason for its high stability is that uCOS-II avoids using dynamic memory as much as possible, for example: each thread stack in uCOS-II is a predefined array. In other words, uCOS-II puts memory...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F12/02
Inventor 左应鹏
Owner 南京龙门电子科技有限公司