bytespool

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBytes

func GetBytes(n int) (rv *[]byte)

func GetUpgradeRespBytes

func GetUpgradeRespBytes() *[]byte

func PutBytes

func PutBytes(bytes *[]byte)

PutBytes可以接受 不是GetBytes分配出来的内存块 如果不是GetBytes分配出来内存块就移到向下一级移去,每一个索引的数据都是>= page * i + enum.MaxFrameHeaderSize,这样保证取出来的数据是够用的,不会太小。

func PutUpgradeRespBytes

func PutUpgradeRespBytes(bytes *[]byte)

Types

type BytesPool added in v0.0.8

type BytesPool struct {
	// contains filtered or unexported fields
}

func New added in v0.0.8

func New() *BytesPool

func (*BytesPool) Free added in v0.0.8

func (p *BytesPool) Free()

func (*BytesPool) GetBytes added in v0.0.8

func (p *BytesPool) GetBytes(n int) (rv *[]byte)

func (*BytesPool) Init added in v0.0.8

func (p *BytesPool) Init()

func (*BytesPool) IsInit added in v0.0.8

func (p *BytesPool) IsInit() bool

func (*BytesPool) PutBytes added in v0.0.8

func (p *BytesPool) PutBytes(bytes *[]byte)

Jump to

Keyboard shortcuts

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