ring_buffer

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ring_buffer implement buffer cache pool to improve memory reuse.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(size int) []byte

Get the ringBuffer pool will return []byte of size is the first value greater than or equal its 2^n. newCap between 1 byte. and 512 mb。

func Put

func Put(buf []byte)

Put if buf is legal then it will be put into the buffer pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL