vk::mem · Functions · S1
11 public declarations with native signatures and source-owned contracts.
Fnvk::mem::set_allocation_name
Contract
Replace a copied UTF-8 diagnostic name transactionally; None clears it.
Errors
Identity/state or host reservation failure leaves the previous name intact.
Fnvk::mem::set_allocation_pinned
Contract
Explicitly pin/unpin a region against future allocator relocation planning.
Fnvk::mem::set_allocation_user_data
Contract
Set uninterpreted consumer metadata. It is never dereferenced, freed or owned.
Fnvk::mem::set_current_frame_index
Contract
Mark a frame boundary for budget refresh; this never retires resources or waits.
Fnvk::mem::set_debug_memory_settings
Contract
Configure debug instrumentation before native allocations or pools exist.
Errors
Rejects live domains, non-four-byte guard margins or missing required map PFNs.
Fnvk::mem::set_external_memory_types
Contract
Configure copied per-memory-type external export flags before creating pools/storage.
Zero flags leave that type ordinary. Every native allocation of a configured
type receives VkExportMemoryAllocateInfo, including separate allocations.
Errors
Rejects live domains, incorrect array length and unavailable handle extensions.
Safety
Flags must be supported and mutually compatible for every resource subsequently allocated on each type, including external dedication requirements. No support query is implied. Matching external resource create chains remain required.
Fnvk::mem::set_heap_limit
Contract
Change a local policy ceiling; this never reserves native heap capacity.
Fnvk::mem::set_mapping_hysteresis
Contract
Configure native pooled mapping retention before creating storage or pools. Enabled by default. Separate allocations never cache mappings. This affects native map/unmap call counts, never allocation-level pointer access rights.
Errors
Rejects a closed allocator or any existing native/pool domain.
Fnvk::mem::set_pool_name
Contract
Replace a pool diagnostic name; metadata allocation failure preserves its old name.
Fnvk::mem::set_preferred_block_size
Contract
Set preferred block bytes for heaps larger than 1 GiB before pool/storage creation.
Small heaps use one eighth of their heap size; both paths round up to 32 bytes.
Does not alter explicit Pooled/Adaptive policies or query/reserve a budget.
Errors
Rejects zero/overflowing sizes, closed state and existing native/pool domains.
Fnvk::mem::statistics
Contract
Calculate local live-region/native-block accounting without querying the driver.