Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReleaseMsgBuf ¶
func ReleaseMsgBuf(buf []byte)
func ReleaseTimer ¶
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
func NewAllocator ¶
func NewAllocator() *Allocator
NewAllocator initiates a []byte allocator for dns.Msg less than 65536 bytes, the waste(memory fragmentation) of space allocation is guaranteed to be no more than 50%.
type BytesBufPool ¶
type BytesBufPool struct {
// contains filtered or unexported fields
}
func NewBytesBufPool ¶
func NewBytesBufPool(initSize int) *BytesBufPool
func (*BytesBufPool) Get ¶
func (p *BytesBufPool) Get() *bytes.Buffer
func (*BytesBufPool) Release ¶
func (p *BytesBufPool) Release(b *bytes.Buffer)
Click to show internal directories.
Click to hide internal directories.