VKVK·API ReferenceAPI Reference·ModulesModules·Modulevk::mem::virtual_blockHost-only region placement over an integer byte range.MdRustExperimental16 symbolsSourceSourcePublished rustdocPublished rustdocFnallocateallocateFunctionAllocate a nonzero region with a nonzero power-of-two alignment.Fnallocate_upperallocate_upperFunctionAllocate downward from the upper end of a linear block.Fnallocation_infoallocation_infoFunctionReject foreign, freed or stale tokens before reading placement metadata.FnclearclearFunctionClear all regions, invalidating every prior generation; never submits or waits.Fndetailed_statisticsdetailed_statisticsFunctionWalk virtual placements/free spans for explicit extent statistics.FnfreefreeFunctionFree a checked live region and invalidate its token; no native effects.Fnis_emptyis_emptyFunctionObserve whether every virtual allocation has been explicitly released or cleared.EnPlacementStrategyPlacementStrategyEnumVMA virtual-TLSF search order; these policies are not latency guarantees.Fnset_user_dataset_user_dataFunctionSet checked per-region opaque metadata without native effects or ownership transfer.FnstatisticsstatisticsFunctionCalculate allocation bytes, free bytes, free-region count and largest span.StVirtualAllocationVirtualAllocationStructGeneration-checked identity in exactly one virtual block; no implicit free.StVirtualAllocationInfoVirtualAllocationInfoStructPlacement snapshot; valid only while the matching allocation remains live.StVirtualBlockVirtualBlockStructVirtual TLSF or linear allocator; owns host metadata and no native objects.StVirtualBlockDetailsVirtualBlockDetailsStructExplicit virtual placement diagnostics; physical holes may not be immediately reusable by linear placement.StVirtualBlockStatsVirtualBlockStatsStructHost metadata statistics. Alignment holes remain free, not reserved to a token. Linear free spans can include holes that placement cannot immediately reuse.Fnwrite_statistics_jsonwrite_statistics_jsonFunctionWrite explicit virtual metadata as ordered vk.memory.virtual.v1 JSON.API referenceAPI reference