Realm

vk::mem · Structs · P1

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

StRustExperimental

Stvk::mem::Pool

Contract

Identity of one live custom pool. Dropping it never destroys native storage.

Methods and associated items

is_destroyed

Method
pub fn is_destroyed(&self) -> bool
No public source comment is attached to this declaration.

fmt

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

Stvk::mem::PoolCreateInfo

pub struct PoolCreateInfo { pub priority: MemoryPriority, pub memory_type_index: u32, pub algorithm: AllocationAlgorithm, pub block_size: u64, pub min_block_count: usize, pub max_block_count: usize, pub min_allocation_alignment: u64, }
Fixed-type ordinary-memory pool; not a Vulkan ABI record.

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

Field
priority: MemoryPriority
No public source comment is attached to this declaration.

memory_type_index

Field
memory_type_index: u32
No public source comment is attached to this declaration.

algorithm

Field
algorithm: AllocationAlgorithm

TLSF by default; linear supports explicit free-at-once and stack lifetimes. Ring and upper-address placement require max_block_count = 1.

block_size

Field
block_size: u64

Exact native block size in bytes, or zero for VMA’s automatic sizing policy.

min_block_count

Field
min_block_count: usize

Preallocate this many blocks transactionally and retain this floor.

max_block_count

Field
max_block_count: usize

Pooled-block ceiling; zero means unlimited. Automatic pools can additionally own dedicated allocations, still subject to native allocation/heap limits.

min_allocation_alignment

Field
min_allocation_alignment: u64

Zero means no additional constraint; otherwise a power of two.

Methods and associated items

new

Method
pub fn new() -> Self

Construct the record with its default state.

set_priority

Method
pub fn set_priority(self, value: MemoryPriority) -> Self

Set priority and return the updated record.

set_memory_type_index

Method
pub fn set_memory_type_index(self, value: u32) -> Self

Set memory_type_index and return the updated record.

set_algorithm

Method
pub fn set_algorithm(self, value: AllocationAlgorithm) -> Self

Set algorithm and return the updated record.

set_block_size

Method
pub fn set_block_size(self, value: u64) -> Self

Set block_size and return the updated record.

set_min_block_count

Method
pub fn set_min_block_count(self, value: usize) -> Self

Set min_block_count and return the updated record.

set_max_block_count

Method
pub fn set_max_block_count(self, value: usize) -> Self

Set max_block_count and return the updated record.

fmt

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

default

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

eq

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

Stvk::mem::PoolStats

pub struct PoolStats { pub allocation_count: usize, pub allocation_bytes: u64, pub reserved_bytes: u64, pub block_count: usize, pub block_bytes: u64, pub free_bytes: u64, pub largest_free_region: u64, }
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.

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

Field
allocation_count: usize
No public source comment is attached to this declaration.

allocation_bytes

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

reserved_bytes

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

block_count

Field
block_count: usize
No public source comment is attached to this declaration.

block_bytes

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

free_bytes

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

largest_free_region

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

Methods and associated items

new

Method
pub fn new() -> Self

Construct the record with its default state.

set_allocation_count

Method
pub fn set_allocation_count(self, value: usize) -> Self

Set allocation_count and return the updated record.

set_allocation_bytes

Method
pub fn set_allocation_bytes(self, value: u64) -> Self

Set allocation_bytes and return the updated record.

set_reserved_bytes

Method
pub fn set_reserved_bytes(self, value: u64) -> Self

Set reserved_bytes and return the updated record.

set_block_count

Method
pub fn set_block_count(self, value: usize) -> Self

Set block_count and return the updated record.

set_block_bytes

Method
pub fn set_block_bytes(self, value: u64) -> Self

Set block_bytes and return the updated record.

set_free_bytes

Method
pub fn set_free_bytes(self, value: u64) -> Self

Set free_bytes and return the updated record.

fmt

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

eq

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