Realm

vk::mem · Enums · A1

3 public declarations with native signatures and source-owned contracts.

EnRustExperimental

Envk::mem::AllocationAlgorithm

Contract

Placement metadata for custom pools and host-only virtual blocks.

Linear placement appends after the current tail; middle holes are not reused. Releasing all regions restarts the range. Last-in-first-out release rewinds a stack; a single-block pool also supports ring and double-stack lifetimes. Strategy flags affect TLSF only. These are placement rules, not GPU lifetime tracking or latency guarantees.

Variants

Tlsf

Variant
Tlsf
No public source comment is attached to this declaration.

Linear

Variant
Linear
No public source comment is attached to this declaration.

Methods and associated items

fmt

Method
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more

default

Method
fn default() -> AllocationAlgorithm
Returns the “default value” for a type. Read more

eq

Method
fn eq(&self, other: &AllocationAlgorithm) -> bool
Tests for self and other values to be equal, and is used by ==.

Envk::mem::AllocationPolicy

pub enum AllocationPolicy { Separate, Automatic, Pooled { block_size: u64, }, Adaptive { block_size: u64, min_block_size: u64, }, }
Managed resource storage policy. Required or preferred native dedication takes precedence.

Contract

Managed resource storage policy. Required or preferred native dedication takes precedence.

Fields

Pooled.field.block_size

Field
block_size: u64
No public source comment is attached to this declaration.

Adaptive.field.block_size

Field
block_size: u64
No public source comment is attached to this declaration.

Adaptive.field.min_block_size

Field
min_block_size: u64
No public source comment is attached to this declaration.

Variants

Separate

Variant
Separate
No public source comment is attached to this declaration.

Automatic

Variant
Automatic

Heap-sized default pools with pinned VMA growth, reuse and separate fallback.

Pooled

Variant
Pooled

Reuse ordinary buffer blocks with this exact native size. No block shrinking. Requests larger than the block use separate storage.

Adaptive

Variant
Adaptive

Try bounded power-of-two block sizes, shrinking only on recoverable storage failure. Large regions and exhausted block attempts fall back to separate storage.

Methods and associated items

fmt

Method
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more

default

Method
fn default() -> AllocationPolicy
Returns the “default value” for a type. Read more

eq

Method
fn eq(&self, other: &AllocationPolicy) -> bool
Tests for self and other values to be equal, and is used by ==.

Envk::mem::AllocError

pub enum AllocError { NoCompatibleMemoryType, InvalidProperties(&'static str), InvalidRequest(&'static str), InvalidRange, UnknownAllocation, UnknownPool, CorruptionDetected { allocation: u64, offset: u64, }, WrongAllocator, AlreadyMapped, NotMapped, NotHostVisible, SerialExhausted, SynchronizationPoisoned, HostAllocationFailed, AllocationLimit, OutOfSpace, AllocationTooLarge { requested: u64, limit: u64, }, UnsupportedCapability(&'static str), WrongResource, LiveAllocations, LivePools, Closed, Call(CallError), Output { kind: ErrorKind, code: Option<i32>, }, }
No public source comment is attached to this declaration.

Fields

CorruptionDetected.field.allocation

Field
allocation: u64
No public source comment is attached to this declaration.

CorruptionDetected.field.offset

Field
offset: u64
No public source comment is attached to this declaration.

AllocationTooLarge.field.requested

Field
requested: u64
No public source comment is attached to this declaration.

AllocationTooLarge.field.limit

Field
limit: u64
No public source comment is attached to this declaration.

Output.field.kind

Field
kind: ErrorKind
No public source comment is attached to this declaration.

Output.field.code

Field
code: Option<i32>
No public source comment is attached to this declaration.

Variants

NoCompatibleMemoryType

Variant
NoCompatibleMemoryType
No public source comment is attached to this declaration.

InvalidProperties

Variant
InvalidProperties(&'static str)
No public source comment is attached to this declaration.

InvalidRequest

Variant
InvalidRequest(&'static str)
No public source comment is attached to this declaration.

InvalidRange

Variant
InvalidRange
No public source comment is attached to this declaration.

UnknownAllocation

Variant
UnknownAllocation
No public source comment is attached to this declaration.

UnknownPool

Variant
UnknownPool
No public source comment is attached to this declaration.

CorruptionDetected

Variant
CorruptionDetected
No public source comment is attached to this declaration.

WrongAllocator

Variant
WrongAllocator
No public source comment is attached to this declaration.

AlreadyMapped

Variant
AlreadyMapped
No public source comment is attached to this declaration.

NotMapped

Variant
NotMapped
No public source comment is attached to this declaration.

NotHostVisible

Variant
NotHostVisible
No public source comment is attached to this declaration.

SerialExhausted

Variant
SerialExhausted
No public source comment is attached to this declaration.

SynchronizationPoisoned

Variant
SynchronizationPoisoned
No public source comment is attached to this declaration.

HostAllocationFailed

Variant
HostAllocationFailed
No public source comment is attached to this declaration.

AllocationLimit

Variant
AllocationLimit
No public source comment is attached to this declaration.

OutOfSpace

Variant
OutOfSpace
No public source comment is attached to this declaration.

AllocationTooLarge

Variant
AllocationTooLarge
No public source comment is attached to this declaration.

UnsupportedCapability

Variant
UnsupportedCapability(&'static str)
No public source comment is attached to this declaration.

WrongResource

Variant
WrongResource
No public source comment is attached to this declaration.

LiveAllocations

Variant
LiveAllocations
No public source comment is attached to this declaration.

LivePools

Variant
LivePools
No public source comment is attached to this declaration.

Closed

Variant
Closed
No public source comment is attached to this declaration.

Call

Variant
Call(CallError)
No public source comment is attached to this declaration.

Output

Variant
Output
No public source comment is attached to this declaration.

Methods and associated items

fmt

Method
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more

fmt-1

Method
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more

from

Method
fn from(error: CallError) -> Self
Converts to this type from the input type.

from-1

Method
fn from(error: ConstructionError) -> Self
Converts to this type from the input type.

eq

Method
fn eq(&self, other: &AllocError) -> bool
Tests for self and other values to be equal, and is used by ==.