allocator

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2021 License: MIT, Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

type Allocator struct {
	// contains filtered or unexported fields
}

func NewAllocator

func NewAllocator(totalMemoryMax uint64, perPeerMax uint64) *Allocator

func (*Allocator) AllocateBlockMemory

func (a *Allocator) AllocateBlockMemory(p peer.ID, amount uint64) <-chan error

func (*Allocator) ReleaseBlockMemory

func (a *Allocator) ReleaseBlockMemory(p peer.ID, amount uint64) error

func (*Allocator) ReleasePeerMemory

func (a *Allocator) ReleasePeerMemory(p peer.ID) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL