types

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocation

type Allocation struct {
	ResourceIdent
	Amount   int64 // bytes
	NUMAZone int64
}

Currently, an Allocation currently can only be a proper subset of a Span.

func (Allocation) Pages

func (ac Allocation) Pages() int64

func (Allocation) String

func (ac Allocation) String() string

func (Allocation) ToQuantityString

func (ac Allocation) ToQuantityString() string

type ResourceIdent

type ResourceIdent struct {
	Kind     ResourceKind
	Pagesize uint64 //bytes
}

func ResourceIdentFromName

func ResourceIdentFromName(name string) (ResourceIdent, error)

name is in the form `memory-4Ki` or `hugepages-1Gi`

func (ResourceIdent) CapacityName

func (ri ResourceIdent) CapacityName() resourceapi.QualifiedName

func (ResourceIdent) FullName

func (ri ResourceIdent) FullName() string

FullName returns a non-canonical, roundtrip-able name

func (ResourceIdent) MinimumAllocatable

func (ri ResourceIdent) MinimumAllocatable() uint64

func (ResourceIdent) Name

func (ri ResourceIdent) Name() string

Name returns the canonical name which is not roundtrip-able

func (ResourceIdent) NeedsHugeTLB

func (ri ResourceIdent) NeedsHugeTLB() bool

func (ResourceIdent) PagesizeString

func (ri ResourceIdent) PagesizeString() string

type ResourceKind

type ResourceKind string
const (
	Memory    ResourceKind = "memory"
	Hugepages ResourceKind = "hugepages"
)

type Span

type Span struct {
	ResourceIdent
	Amount   int64 // bytes
	NUMAZone int64
}

A Span is a memory area

func (Span) MakeAllocation

func (sp Span) MakeAllocation(amount int64) Allocation

func (Span) Pages

func (sp Span) Pages() int64

func (Span) String

func (sp Span) String() string

Jump to

Keyboard shortcuts

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