Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for zero copy of embedded system memory

An embedded system and memory release technology, which is applied in the direction of transmission system, multi-program device, program control design, etc., can solve the problems of no optimal solution, performance loss, etc., and achieve the effect of avoiding memory leakage and copying

Active Publication Date: 2022-04-12
ASR MICROELECTRONICS CO LTD
View PDF7 Cites 0 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 present application discloses a zero-copy method for embedded system memory, which includes the following steps. Step S10: adopting a unified data block format, including a standard header, an extended header and a reserved space. Step S20: Module A allocates memory for data Z according to the unified data block format, and configures the mem_msg field; at the same time, writes data Z in the corresponding head position of the unified data block format. Step S30: module A expands the data structure of pbuf, and adds pointers to the Ethernet header and memory allocation and release fields. Step S40: Module A processes data Z based on the expanded pbuf data structure, and adds a release function pointer in the mem_msg field pointed to by the pkt_msg pointer in the pbuf release function. Step S50: Module B reads the memory allocation and release field, and calls the memory release function pointed to by the release function pointer therein to release the memory occupied by data Z. This application optimizes memory allocation and release, and data zero-copy transfer.

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 Patents(China)
IPC IPC(8): H04L49/901G06F9/50
CPCH04L49/901G06F9/5016G06F9/5022
Inventor 许井泉黄永佳周进
Owner ASR MICROELECTRONICS CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products