Realm

vk::mem · Functions · D1

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

FnRustExperimental

Fnvk::mem::destroy_buffer

pub unsafe fn destroy_buffer( allocator: &mut Allocator<'_>, buffer: Buffer, allocation: &mut Allocation, ) -> Result<(), AllocError>
Destroy a matching resource pair in buffer-before-memory order with matching retained callbacks.

Contract

Destroy a matching resource pair in buffer-before-memory order with matching retained callbacks.

Safety

Complete all host/GPU uses. Neither object may have been externally destroyed. The buffer must use this allocator’s callbacks; otherwise destroy it directly then free.

Fnvk::mem::destroy_image

pub unsafe fn destroy_image( allocator: &mut Allocator<'_>, image: Image, allocation: &mut Allocation, ) -> Result<(), AllocError>
Destroy the exact image/token pair with matching retained callbacks before freeing memory.

Contract

Destroy the exact image/token pair with matching retained callbacks before freeing memory.

Safety

Destroy views and complete all native uses first; do not externally destroy this image. The image must use this allocator’s callbacks; otherwise destroy it directly then free.

Fnvk::mem::destroy_pool

Contract

Destroy an empty pool, releasing its retained native blocks explicitly.

Errors

Rejects closed, foreign, stale or live-allocation pools before native effects.

Fnvk::mem::detailed_pool_statistics

pub fn detailed_pool_statistics( allocator: &Allocator<'_>, pool: &Pool, ) -> Result<DetailedStatistics, AllocError>
Walk actual blocks/live regions belonging to one checked custom pool.

Contract

Walk actual blocks/live regions belonging to one checked custom pool.

Fnvk::mem::detailed_statistics

Contract

Walk actual native blocks and live regions to build detailed local statistics.

Linear free holes are physical space, not a promise of immediate reuse. Native block bytes, requested bytes and reserved atom padding stay distinct. No driver query, map, native allocation or GPU synchronization occurs.

Errors

Closed allocators are rejected.