Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultAllocator = memory.DefaultAllocator
DefaultAllocator is the default memory allocator for Flux.
This implements the memory.Allocator interface from arrow.
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 // Allocator is the underlying memory allocator used to // allocate and free memory. // If this is unset, the DefaultAllocator is used. Allocator memory.Allocator // contains filtered or unexported fields }
Allocator tracks the amount of memory being consumed by a query.
func (*Allocator) Account ¶ added in v0.48.0
Account will manually account for the amount of memory being used. This is typically used for memory that is allocated outside of the Allocator that must be recorded in some way.
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. Free will release the memory associated with the byte slice.
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