Versions in this module Expand all Collapse all v1 v1.1.9 Oct 1, 2018 Changes in this version + var DefaultPoolAllocationSize = envutil.EnvOrDefaultInt64("COCKROACH_ALLOCATION_CHUNK_SIZE", 10 * 1024) + type BoundAccount struct + func MakeStandaloneBudget(capacity int64) BoundAccount + func (b *BoundAccount) Clear(ctx context.Context) + func (b *BoundAccount) Close(ctx context.Context) + func (b *BoundAccount) Grow(ctx context.Context, x int64) error + func (b *BoundAccount) ResizeItem(ctx context.Context, oldSz, newSz int64) error + func (b *BoundAccount) Shrink(ctx context.Context, x int64) + type BytesAccount struct + func (acc BytesAccount) CurrentlyAllocated() int64 + type BytesMonitor struct + func MakeMonitor(name string, res Resource, curCount *metric.Counter, maxHist *metric.Histogram, ...) BytesMonitor + func MakeMonitorInheritWithLimit(name string, limit int64, m *BytesMonitor) BytesMonitor + func MakeMonitorWithLimit(name string, res Resource, limit int64, curCount *metric.Counter, ...) BytesMonitor + func MakeUnlimitedMonitor(ctx context.Context, name string, res Resource, curCount *metric.Counter, ...) BytesMonitor + func (mm *BytesMonitor) ClearAccount(ctx context.Context, acc *BytesAccount) + func (mm *BytesMonitor) CloseAccount(ctx context.Context, acc *BytesAccount) + func (mm *BytesMonitor) EmergencyStop(ctx context.Context) + func (mm *BytesMonitor) GetCurrentAllocationForTesting() int64 + func (mm *BytesMonitor) GrowAccount(ctx context.Context, acc *BytesAccount, extraSize int64) error + func (mm *BytesMonitor) MakeBoundAccount() BoundAccount + func (mm *BytesMonitor) OpenAccount(_ *BytesAccount) + func (mm *BytesMonitor) OpenAndInitAccount(ctx context.Context, acc *BytesAccount, initialAllocation int64) error + func (mm *BytesMonitor) ResizeItem(ctx context.Context, acc *BytesAccount, oldSize, newSize int64) error + func (mm *BytesMonitor) ShrinkAccount(ctx context.Context, acc *BytesAccount, delta int64) + func (mm *BytesMonitor) Start(ctx context.Context, pool *BytesMonitor, reserved BoundAccount) + func (mm *BytesMonitor) Stop(ctx context.Context) + type Resource interface + NewBudgetExceededError func(requestedBytes int64, budgetBytes int64) error + var DiskResource Resource = diskResource{} + var MemoryResource Resource = memoryResource{}