pub struct AllocationInfo {
pub device_memory: DeviceMemory,
pub offset: u64,
pub size: u64,
pub reserved_size: u64,
pub memory_type_index: u32,
pub heap_index: u32,
pub memory_properties: MemoryPropertyFlags,
pub mapped_pointer: Option<*mut c_void>,
pub map_count: u32,
pub native_size: u64,
pub is_separate: bool,
pub user_data: usize,
}Expand description
Checked binding and mapping snapshot of one live allocation.
Offsets and sizes are native bytes. size is the queried memory requirement,
not necessarily the logical buffer size or a linear image’s pixel extent.
Copying a snapshot does not retain its allocation, mapping or native objects.
Query again after mapping changes; never use a saved pointer after unmap/free.
Fields§
§device_memory: DeviceMemory§offset: u64§size: u64§reserved_size: u64Includes non-coherent atom padding reserved to a pooled region.
memory_type_index: u32§heap_index: u32§memory_properties: MemoryPropertyFlagsActual selected memory properties, rather than requested preferences.
mapped_pointer: Option<*mut c_void>Allocation-relative pointer, present only for this region’s mapping hold. Observing this pointer does not acquire a hold or authorize dereferencing it.
map_count: u32Explicit mapping holds; persistent mapping is independent.
native_size: u64Size of the backing native memory object, including other pooled regions.
is_separate: boolSeparate native storage rather than a pooled placement (not proof of native dedication).
user_data: usizeOpaque consumer metadata. No dereference or ownership is inferred.
Implementations§
Source§impl AllocationInfo
impl AllocationInfo
Sourcepub fn set_device_memory(self, value: DeviceMemory) -> Self
pub fn set_device_memory(self, value: DeviceMemory) -> Self
Set device_memory and return the updated record.
Sourcepub fn set_offset(self, value: u64) -> Self
pub fn set_offset(self, value: u64) -> Self
Set offset and return the updated record.
Sourcepub fn set_reserved_size(self, value: u64) -> Self
pub fn set_reserved_size(self, value: u64) -> Self
Set reserved_size and return the updated record.
Sourcepub fn set_memory_type_index(self, value: u32) -> Self
pub fn set_memory_type_index(self, value: u32) -> Self
Set memory_type_index and return the updated record.
Sourcepub fn set_heap_index(self, value: u32) -> Self
pub fn set_heap_index(self, value: u32) -> Self
Set heap_index and return the updated record.
Sourcepub fn set_memory_properties(self, value: MemoryPropertyFlags) -> Self
pub fn set_memory_properties(self, value: MemoryPropertyFlags) -> Self
Set memory_properties and return the updated record.
Sourcepub fn set_mapped_pointer(self, value: Option<*mut c_void>) -> Self
pub fn set_mapped_pointer(self, value: Option<*mut c_void>) -> Self
Set mapped_pointer and return the updated record.
Sourcepub fn set_map_count(self, value: u32) -> Self
pub fn set_map_count(self, value: u32) -> Self
Set map_count and return the updated record.
Sourcepub fn set_native_size(self, value: u64) -> Self
pub fn set_native_size(self, value: u64) -> Self
Set native_size and return the updated record.
Sourcepub fn set_is_separate(self, value: bool) -> Self
pub fn set_is_separate(self, value: bool) -> Self
Set is_separate and return the updated record.
Sourcepub fn set_user_data(self, value: usize) -> Self
pub fn set_user_data(self, value: usize) -> Self
Set user_data and return the updated record.