Method and device for zero copy of embedded system memory

An embedded system, memory release technology, applied in transmission systems, digital transmission systems, multi-programming devices, etc., can solve problems such as no optimal solution, performance loss, etc.

Active Publication Date: 2020-10-20
ASR MICROELECTRONICS CO LTD
View PDF7 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Different data sources may correspond to different memory allocation modes, and for the TCP / IP protocol, the processing of each layer of IP data packets needs to reduce copying as much as possible to avoid performance loss
[0004] Existing technical solutions focus more on improving the efficiency of memory allocation, such as adopting the design method of memory pool to improve access efficiency, but no optimization solution is proposed from the perspective of the system

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
  • Method and device for zero copy of embedded system memory
  • Method and device for zero copy of embedded system memory
  • Method and device for zero copy of embedded system memory

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028]see figure 1 , which is a typical implementation block diagram of an RTOS system used by an embedded network device. The embedded network device generally has multiple LAN (Local Area Network, local area network) interfaces and at least one WAN (Wide Area Network, wide area network) interface. The LAN interface is called LAN port for short, and the WAN port is called WAN port for short. These LAN ports share single or multiple WAN ports to access the Internet through the message processing main thread in the RTOS system. Each LAN port can be used to connect an access device. The WAN port can be used to connect network export devices. Such as figure 1 As shown, there may be multiple message processing threads based on the RTOS system, and there may be multiple interfaces, and each interface may correspond to a different access protocol.

[0029] A wireless router is a typical embedded system, which is generally implemented by an RTOS system and a TCP / IP protocol stac...

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 discloses a method for zero copy of an embedded system memory. The method comprises the following steps that S10, a unified data block format which comprises a standard head, an extension head and a reserved space is adopted; S20, a module A allocates a memory to the data Z according to a unified data block format, and configures a mem_msg field; and writing data Z in the corresponding header position of the unified data block format; S30, the module A expands the data structure of the pbuf, and adds a pointer pointing to the head of the Ethernet and the memory allocation and release field; S40, the module A processes the data Z based on the expanded pbuf data structure, and adds a release function pointer in a mem_msg field pointed by the pkt_msg pointer in a pbuf release function; S50, the module B reads the memory allocation and release field, and calls the memory release function pointed by the release function pointer to release the memory occupied by the data Z. According to the method, memory allocation and release and data zero-copy transmission are optimized.

Description

technical field [0001] The present application relates to a memory allocation and release management method of an embedded system (embedded system). Background technique [0002] In an embedded system based on RTOS (real-time operating system, real-time operating system), there may be various types of internal memory, such as RAM (random-access memory, random access memory), ROM (read-only memory, only Read memory), and a specific memory pool (memory pool). In this application, the internal memories in these embedded systems are collectively referred to as memory. At the same time, in order to adapt to the special scene of the module, it is also possible to define the way of memory allocation and release for the module. For RTOS systems, the scheduling of tasks generally adopts the method of thread (thread), and the memory is shared by all threads, so the message interaction between threads often adopts the method of shared memory, which brings about the management of memo...

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): H04L12/879G06F9/50H04L49/901
CPCH04L49/901G06F9/5016G06F9/5022
Inventor 许井泉黄永佳周进
Owner ASR MICROELECTRONICS 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
Try Eureka
PatSnap group products