unsafe fn allocate(
        &mut self,
        allocate_info: vk::MemoryAllocateInfo,
    ) -> Result<Allocation> {
        let expanded_allocate_info = vk::MemoryAllocateInfo {
            memory_type_index: allocate_info.memory_type_index,
            allocation_size: allocate_info.allocation_size + self.offset(),
            ..Default::default()
        };
        let mut allocation = self.allocator.allocate(expanded_allocate_info)?;
        allocation.offset += self.offset();
        allocation.byte_size = allocate_info.allocation_size;
        Ok(allocation)
    }
/// Use the underlying allocator implementation to allocate an oversized
/// piece of memory, then set an offset to compensate.
///
/// This has no practical use other than proving that code properly handles
/// memory offsets.
Use the underlying allocator implementation to allocate an oversized
piece of memory, then set an offset to compensate.

This has no practical use other than proving that code properly handles
memory offsets.
Use the underlying allocator implementation to allocate an oversized piece of memory then set an offset to compensate . This has no practical use other than proving that code properly handles memory offsets .
unsafe fn allocate(
        &mut self,
        allocate_info: vk::MemoryAllocateInfo,
    ) -> Result<Allocation> {
        let expanded_allocate_info = vk::MemoryAllocateInfo {
            memory_type_index: allocate_info.memory_type_index,
            allocation_size: allocate_info.allocation_size + self.offset(),
            ..Default::default()
        };
        let mut allocation = self.allocator.allocate(expanded_allocate_info)?;
        allocation.offset += self.offset();
        allocation.byte_size = allocate_info.allocation_size;
        Ok(allocation)
    }
unsafe fn allocate ( & mut self , allocate_info : vk :: MemoryAllocateInfo , ) -> Result < Allocation > { let expanded_allocate_info = vk :: MemoryAllocateInfo { memory_type_index : allocate_info . memory_type_index , allocation_size : allocate_info . allocation_size + self . offset ( ) , .. Default :: default ( ) } ; let mut allocation = self . allocator . allocate ( expanded_allocate_info ) ? ; allocation . offset += self . offset ( ) ; allocation . byte_size = allocate_info . allocation_size ; Ok ( allocation ) }
Use the underlying allocator implementation to allocate an oversized
piece of memory, then set an offset to compensate.
Use the underlying allocator implementation to allocate an oversized piece of memory then set an offset to compensate .
&mut self
allocate_info
vk::MemoryAllocateInfo