[][src]Trait alloc_wg::alloc::DeallocRef

pub trait DeallocRef: Sized {
    type BuildAlloc: BuildAllocRef<Ref = Self>;
    fn get_build_alloc(&mut self) -> Self::BuildAlloc;
unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: NonZeroLayout); }

Associated Types

type BuildAlloc: BuildAllocRef<Ref = Self>

Loading content...

Required methods

fn get_build_alloc(&mut self) -> Self::BuildAlloc

unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: NonZeroLayout)

Safety

  • ptr must denote a block of memory currently allocated via this allocator
  • layout must fit that block of memory
  • the alignment of the layout must match the alignment used to allocate that block of memory
Loading content...

Implementations on Foreign Types

impl DeallocRef for System[src]

type BuildAlloc = Self

Loading content...

Implementors

impl DeallocRef for Global[src]

type BuildAlloc = Self

impl<A: DeallocRef> DeallocRef for AbortAlloc<A>[src]

type BuildAlloc = AbortAlloc<A::BuildAlloc>

Loading content...