vk::mem · Structs · P1
3 public declarations with native signatures and source-owned contracts.
Stvk::mem::Pool
Contract
Identity of one live custom pool. Dropping it never destroys native storage.
Methods and associated items
is_destroyed
fmt
Stvk::mem::PoolCreateInfo
Contract
Fixed-type ordinary-memory pool; not a Vulkan ABI record.
Uses the selected placement algorithm. Priority requires captured enabled
EXT feature metadata. Use create_pool_with_chain for a retained borrowed native chain.
Fields
priority
priority: MemoryPrioritymemory_type_index
memory_type_index: u32algorithm
algorithm: AllocationAlgorithmTLSF by default; linear supports explicit free-at-once and stack lifetimes.
Ring and upper-address placement require max_block_count = 1.
block_size
block_size: u64Exact native block size in bytes, or zero for VMA’s automatic sizing policy.
min_block_count
min_block_count: usizePreallocate this many blocks transactionally and retain this floor.
max_block_count
max_block_count: usizePooled-block ceiling; zero means unlimited. Automatic pools can additionally own dedicated allocations, still subject to native allocation/heap limits.
min_allocation_alignment
min_allocation_alignment: u64Zero means no additional constraint; otherwise a power of two.
Methods and associated items
new
Construct the record with its default state.
set_priority
Set priority and return the updated record.
set_memory_type_index
Set memory_type_index and return the updated record.
set_algorithm
Set algorithm and return the updated record.
set_block_size
Set block_size and return the updated record.
set_min_block_count
Set min_block_count and return the updated record.
set_max_block_count
Set max_block_count and return the updated record.
set_min_allocation_alignment
Set min_allocation_alignment and return the updated record.
clone
fmt
default
eq
self and other values to be equal, and is used by ==.Stvk::mem::PoolStats
Contract
Local pool statistics. No native budget query or host allocation is performed. Free spans describe physical holes; alignment/granularity may prevent their use. Linear holes additionally wait for their stack/ring lifetime to retire. Counts/bytes include pool-owned dedicated allocations and retained empty blocks.
Fields
allocation_count
allocation_count: usizeallocation_bytes
allocation_bytes: u64reserved_bytes
reserved_bytes: u64block_count
block_count: usizeblock_bytes
block_bytes: u64free_bytes
free_bytes: u64largest_free_region
largest_free_region: u64Methods and associated items
new
Construct the record with its default state.
set_allocation_count
Set allocation_count and return the updated record.
set_allocation_bytes
Set allocation_bytes and return the updated record.
set_reserved_bytes
Set reserved_bytes and return the updated record.
set_block_count
Set block_count and return the updated record.
set_block_bytes
Set block_bytes and return the updated record.
set_free_bytes
Set free_bytes and return the updated record.
set_largest_free_region
Set largest_free_region and return the updated record.
clone
fmt
default
eq
self and other values to be equal, and is used by ==.