[−][src]Struct gfx_memory::Heaps
Heaps available on particular physical device.
Implementations
impl<B: Backend> Heaps<B>
[src][−]
pub unsafe fn new(
hal_memory_properties: &MemoryProperties,
config_general: GeneralConfig,
config_linear: LinearConfig,
non_coherent_atom_size: Size
) -> Self
[src][−]
hal_memory_properties: &MemoryProperties,
config_general: GeneralConfig,
config_linear: LinearConfig,
non_coherent_atom_size: Size
) -> Self
pub fn allocate(
&mut self,
device: &B::Device,
requirements: &Requirements,
usage: MemoryUsage,
kind: Kind
) -> Result<MemoryBlock<B>, HeapsError>
[src][−]
&mut self,
device: &B::Device,
requirements: &Requirements,
usage: MemoryUsage,
kind: Kind
) -> Result<MemoryBlock<B>, HeapsError>
Allocate memory block give the requirements
from gfx-hal.
for intended usage
, using the kind
of allocator.
pub fn free(&mut self, device: &B::Device, block: MemoryBlock<B>)
[src][−]
Free memory block.
Memory block must be allocated from this heap.
pub fn clear(&mut self, device: &B::Device)
[src][−]
Clear allocators.
Call this before dropping an instance of Heaps
or if you are low on memory.
Internally calls the clear methods on all
internal LinearAllocator
and GeneralAllocator
instances.
pub fn utilization(&self) -> TotalMemoryUtilization
[src][−]
Get memory utilization.
Trait Implementations
Auto Trait Implementations
impl<B> RefUnwindSafe for Heaps<B> where
<B as Backend>::Memory: RefUnwindSafe,
<B as Backend>::Memory: RefUnwindSafe,
impl<B> Send for Heaps<B>
impl<B> Sync for Heaps<B>
impl<B> Unpin for Heaps<B>
impl<B> UnwindSafe for Heaps<B> where
<B as Backend>::Memory: RefUnwindSafe,
<B as Backend>::Memory: RefUnwindSafe,
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,
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>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,