Struct vk_alloc::Allocator [−][src]
The general purpose memory allocator. Implemented as a segregated list allocator.
Implementations
impl Allocator
[src]
pub fn new(
instance: &Instance,
physical_device: PhysicalDevice,
logical_device: &Device,
descriptor: &AllocatorDescriptor
) -> Self
[src]
instance: &Instance,
physical_device: PhysicalDevice,
logical_device: &Device,
descriptor: &AllocatorDescriptor
) -> Self
Creates a new general purpose allocator.
pub fn allocate(
&mut self,
descriptor: &AllocationDescriptor
) -> Result<Allocation, AllocatorError>
[src]
&mut self,
descriptor: &AllocationDescriptor
) -> Result<Allocation, AllocatorError>
Allocates memory on the allocator.
pub fn free(&mut self, allocation: Allocation) -> Result<(), AllocatorError>
[src]
Frees the allocation.
Trait Implementations
impl AllocatorStatistic for Allocator
[src]
fn allocation_count(&self) -> usize
[src]
fn unused_range_count(&self) -> usize
[src]
fn used_bytes(&self) -> u64
[src]
fn unused_bytes(&self) -> u64
[src]
fn block_count(&self) -> usize
[src]
impl Drop for Allocator
[src]
Auto Trait Implementations
impl RefUnwindSafe for Allocator
[src]
impl !Send for Allocator
[src]
impl !Sync for Allocator
[src]
impl Unpin for Allocator
[src]
impl UnwindSafe for Allocator
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,