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

Design method for improving memory usage rate of buffer area in network programming

A design method and buffer technology, applied in the field of network communication, can solve problems such as low utilization rate and inability to recycle memory, and achieve the effect of strong addition and deletion

Inactive Publication Date: 2013-08-21
EASTLAND DIGITAL CORP
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The purpose of the present invention is to provide a design method for improving buffer memory usage in network programming, which can connect buffer nodes one by one to form a buffer linked list, thus satisfying data of any size Stored in; and the structure of the linked list is very strong in addition and deletion, and each node is independent and can be recycled individually, which solves the problem that the entire continuous buffer cannot reclaim part of the memory, resulting in low usage

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
  • Design method for improving memory usage rate of buffer area in network programming

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0013] see figure 1 , the specific embodiment adopts the following technical scheme: it includes the business layer that provides the source of the message packet, the network layer that processes the message packet, and the reader that takes out the buffer data; the network layer that processes the message packet is to initialize a buffer Linked list, the buffer linked list has only one buffer node and the space allocated for this is 8KB.

[0014] When the business layer that provides the source of the message packet needs to transmit the message packet to the network layer for processing, if the content of the message is less than 8KB, the message is placed in the first buffer node of the buffer list. If the content data of this message is very large enough to be n times the size of a single buffer, then the buffer list will generate n buffers to store the data.

[0015] The reader who takes out the buffer data is to take out the data from the network layer buffer linked li...

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 design method for improving a memory usage rate of a buffer area in network programming, and relates to the field of network communication. A network layer processing message packet initializes a chain table of a buffer, and the chain table of the buffer area is only provided with one node of the buffer area and a distributed space for the node of the buffer area is 8KB. According to a service layer providing the source of the message packet, when the message packet is transmitted to the network layer to be processed, if the content of a message is smaller than 8KB, the message is placed on a first node of the buffer area of the chain table of the buffer area. A reading side taking out the data of the buffer area takes the data from the chain table of the buffer area of the network layer, and whenever reading of a buffer area is finished, the node of the buffer area is released from the chain table of the buffer area until the last buffer area. The design method for improving the memory usage rate of the buffer area in the network programming solves the problem that a usage rate is low due to the fact that an integrated continuous buffer area cannot retrieve part of internal memory.

Description

Technical field: [0001] The invention relates to the field of network communication, in particular to a design method for improving the utilization rate of buffer memory in network programming. Background technique: [0002] At present, many network communication libraries use a buffer that can automatically expand in the design of message buffers. The basic strategy is as follows: [0003] 1. When the buffer is not enough to store new messages, it will organize the memory internally to see if it can free up enough space. [0004] 2. If there is not enough space to store, then expand the buffer to double the original size, and the expanded buffer will not shrink. [0005] There will be no problem in doing ordinary stable transmission, but if the business layer puts a large piece of message packet (more than 2MB) into the buffer, or the business layer quickly puts small pieces of data into the buffer , and the underlying IO multiplexed thread does not have time to respond d...

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): H04L12/861G06F12/08G06F17/30G06F12/0871
Inventor 邹国卫
Owner EASTLAND DIGITAL CORP
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