alloc_traits::util::defaults::local

Function realloc

Source
pub unsafe fn realloc<'alloc, Alloc>(
    this: &'alloc Alloc,
    alloc: Allocation<'alloc>,
    layout: NonZeroLayout,
) -> Option<Allocation<'alloc>>
where Alloc: LocalAlloc<'alloc> + ?Sized,
Expand description

Change the layout of a block previously allocated.

See LocalAlloc::realloc for more information. This is a default implementation that might be less efficient than a dedicated one. It only uses the alloc and dealloc methods.

ยงSafety

See the trait.