vk::mem · Enums · A1
3 public declarations with native signatures and source-owned contracts.
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
TlsfLinear
LinearMethods and associated items
clone
fmt
default
eq
self and other values to be equal, and is used by ==.Envk::mem::AllocationPolicy
Contract
Managed resource storage policy. Required or preferred native dedication takes precedence.
Fields
Pooled.field.block_size
block_size: u64Adaptive.field.block_size
block_size: u64Adaptive.field.min_block_size
min_block_size: u64Variants
Separate
SeparateAutomatic
AutomaticHeap-sized default pools with pinned VMA growth, reuse and separate fallback.
Pooled
PooledReuse ordinary buffer blocks with this exact native size. No block shrinking. Requests larger than the block use separate storage.
Adaptive
AdaptiveTry 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
clone
fmt
default
eq
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>,
},
}Fields
CorruptionDetected.field.allocation
allocation: u64CorruptionDetected.field.offset
offset: u64AllocationTooLarge.field.requested
requested: u64AllocationTooLarge.field.limit
limit: u64Output.field.kind
kind: ErrorKindOutput.field.code
code: Option<i32>Variants
NoCompatibleMemoryType
NoCompatibleMemoryTypeInvalidProperties
InvalidProperties(&'static str)InvalidRequest
InvalidRequest(&'static str)InvalidRange
InvalidRangeUnknownAllocation
UnknownAllocationUnknownPool
UnknownPoolCorruptionDetected
CorruptionDetectedWrongAllocator
WrongAllocatorAlreadyMapped
AlreadyMappedNotMapped
NotMappedNotHostVisible
NotHostVisibleSerialExhausted
SerialExhaustedSynchronizationPoisoned
SynchronizationPoisonedHostAllocationFailed
HostAllocationFailedAllocationLimit
AllocationLimitOutOfSpace
OutOfSpaceAllocationTooLarge
AllocationTooLargeUnsupportedCapability
UnsupportedCapability(&'static str)WrongResource
WrongResourceLiveAllocations
LiveAllocationsLivePools
LivePoolsClosed
ClosedCall
Call(CallError)Output
OutputMethods and associated items
fmt
fmt-1
from
from-1
eq
self and other values to be equal, and is used by ==.