Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Buf ¶ added in v2.1.0
type Buf struct {
// contains filtered or unexported fields
}
Buf is a buffer allocated using this package.
func MakeBufUnsafe ¶ added in v2.1.0
MakeBufUnsafe should be used with caution: the given data and n must match exactly the data and length of a Buf obtained from New. It is useful when these are stored implicitly in another type (like a []byte) and we want to reconstruct the Buf.
func New ¶
New allocates a slice of size n. The returned slice is from manually managed memory and MUST be released by calling Free. Failure to do so will result in a memory leak.
type Metrics ¶
type Metrics [NumPurposes]struct { // InUseBytes is the total number of bytes currently allocated. This is just // the sum of the lengths of the allocations and does not include any overhead // or fragmentation. InUseBytes uint64 }
Metrics contains memory statistics by purpose.
Click to show internal directories.
Click to hide internal directories.