pool

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(size int) []byte

Get gets a buffer from pool, size should in range: [1, 65536], otherwise, this function will call make([]byte, size) directly.

func GetClosestN

func GetClosestN(need int) (n int)

func GetZero

func GetZero(size int) []byte

GetZero returns buffer and set all the values to 0

func Put

func Put(buf []byte)

Put puts a buffer into pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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