Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Memory control method for embedded systems

An embedded system and memory control technology, applied in the direction of memory address/allocation/relocation, etc., can solve problems such as abnormal system operation, system crash, and failure to locate memory, so as to avoid memory fragmentation, improve efficiency, and prevent memory overwriting Effect

Active Publication Date: 2013-02-06
WUHAN POST & TELECOMM RES INST CO LTD
View PDF6 Cites 78 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] However, the memory pool also has certain disadvantages. All processes share the same memory pool. Multiple tasks of multiple processes will compete for the same lock when allocating and releasing memory blocks. The overhead of locks will greatly reduce the efficiency of memory management.
In addition, the control information of the memory pool and the memory block of the application layer are stored continuously. Once the misoperation of application memory overwriting occurs, the control information of the memory block will often be overwritten, which may lead to serious consequences including system crashes.
[0006] In addition, the application of pointers in C code will bring hidden dangers of memory out of bounds. It often happens that the content of a certain section of memory is modified and the system runs abnormally. When an exception occurs, it is only a crime scene, and it is impossible to locate who modified this section of memory.

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 control method for embedded systems
  • Memory control method for embedded systems
  • Memory control method for embedded systems

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0054] The memory control mechanism of the present invention is applicable to shared memory, heap memory, etc. First, apply for a large block of memory from the operating system, one part is used as a memory pool, and the other part is used as a reserved memory area, and memory management based on the memory pool and reserved memory area The operations specifically include memory initialization, memory allocation, memory release, cache reclamation, and memory coverage check. The memory pool adopts pool management, combined with thread cache technology, to create a cache for each thread, avoiding the situation where all threads compete for the same lock, and adding active recycling and forced recycling mechanisms to ensure the supply of the memory pool to other threads. This mechanism Avoid memory fragmentation and effectively improve the efficiency of inter-process communication; the reserved memory area is managed by the TLSF algorithm to avoid the shortage of free memory bloc...

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 control method for embedded systems. The method includes: applying for memory in an operating system, and using part of the memory as a memory pool and the other part as a reserved memory area; establishing a cache for each thread by pool management of the memory pool and thread caching technology; subjecting the reserved memory area to management by TLSF (two-level segregated fit) algorithm; dividing the memory pool into memory blocks different in size, connecting the memory blocks in the same size to form a double linked list, adding a memory management unit for each memory block, and placing the memory management unit and the memory blocks in different memory areas respectively; and establishing a memory statistical linked list for each thread to connect the memory blocks applied by the thread so as to facilitate troubleshooting of memory leak. In addition, a memory coverage checking mechanism is added without increasing cost of the memory control method.

Description

technical field [0001] The invention relates to the technical field of embedded systems, in particular to a memory control method of the embedded system. Background technique [0002] The memory resource of the embedded system is quite limited, so it needs to be planned and managed reasonably. Memory is the basis for all threads in the system to run, and is the most important system resource of the embedded system. Simple and efficient memory organization and management is the guarantee of stable and high-speed operation of the system. Embedded systems require fast, reliable and efficient memory allocation. A common management method is the memory pool method. [0003] The implementation mechanism is to apply for all the memory required by all subsequent applications at one time, cut it into memory blocks of various fixed sizes and different numbers, form a memory pool according to a certain data structure, and then perform secondary allocation on demand. [0004] The pu...

Claims

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

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F12/02
Inventor 陶琴王凌斐
Owner WUHAN POST & TELECOMM RES INST CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products