Documentation
¶
Index ¶
- Constants
- Variables
- func Append[T any](ac *Allocator, s []T, elems ...T) []T
- func New[T any](ac *Allocator) (r *T)
- func NewSlice[T any](ac *Allocator, len, cap int) (r []T)
- type Allocator
- func (ac *Allocator) BlockSize() int64
- func (ac *Allocator) Bool(v bool) (r *bool)
- func (ac *Allocator) Debug()
- func (ac *Allocator) Float32(v float32) (r *float32)
- func (ac *Allocator) Float64(v float64) (r *float64)
- func (ac *Allocator) Int(v int) (r *int)
- func (ac *Allocator) Int32(v int32) (r *int32)
- func (ac *Allocator) Int64(v int64) (r *int64)
- func (ac *Allocator) Merge(src *Allocator) *Allocator
- func (ac *Allocator) NewString(v string) string
- func (ac *Allocator) Reset()
- func (ac *Allocator) ReturnAlloctorToPool()
- func (ac *Allocator) String(v string) (r *string)
- func (ac *Allocator) Uint32(v uint32) (r *uint32)
- func (ac *Allocator) Uint64(v uint64) (r *uint64)
- type Logger
Constants ¶
Variables ¶
View Source
var ( // our memory is much cheaper than systems, // so we can be more aggressive than `append`. SliceExtendRatio = 2.5 BugfixClearPointerInMem = true BugfixCorruptOtherMem = true )
Functions ¶
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
Allocator 分配器
func (*Allocator) ReturnAlloctorToPool ¶
func (ac *Allocator) ReturnAlloctorToPool()
ReturnAlloctorToPool 归还分配池
Click to show internal directories.
Click to hide internal directories.