Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
type Allocator struct { // Limit is the limit on the amount of memory that this allocator // can assign. If this is null, there is no limit. Limit *int64 // contains filtered or unexported fields }
Allocator tracks the amount of memory being consumed by a query.
func (*Allocator) Allocate ¶
Allocate will ensure that the requested memory is available and record that it is in use.
func (*Allocator) Free ¶
Free will reduce the amount of memory used by this Allocator. In general, memory should be freed using the Reference returned by Allocate. Not all code is capable of using this though so this method provides a low-level way of releasing the memory without using a Reference.
func (*Allocator) MaxAllocated ¶
MaxAllocated reports the maximum amount of allocated memory at any point in the query.
type LimitExceededError ¶
LimitExceededError is an error when the allocation limit is exceeded.
func (LimitExceededError) Error ¶
func (a LimitExceededError) Error() string
Click to show internal directories.
Click to hide internal directories.