pool

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const PoolSize = 64 * 1024
View Source
const PoolSizeCopy = 32 << 10
View Source
const PoolSizeSmall = 100
View Source
const PoolSizeUdp = 1472

Variables

View Source
var BufPool = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSize)
	},
}
View Source
var BufPoolCopy = sync.Pool{
	New: func() interface{} {
		buf := make([]byte, PoolSizeCopy)
		return &buf
	},
}
View Source
var BufPoolMax = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSize)
	},
}
View Source
var BufPoolSmall = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSizeSmall)
	},
}
View Source
var BufPoolUdp = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSizeUdp)
	},
}

Functions

func GetBufPoolCopy added in v0.18.1

func GetBufPoolCopy() []byte

func PutBufPoolCopy

func PutBufPoolCopy(buf []byte)

func PutBufPoolMax added in v0.0.16

func PutBufPoolMax(buf []byte)

func PutBufPoolUdp

func PutBufPoolUdp(buf []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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