pub fn relloc(
ptr: *mut u8,
new_size: usize,
) -> Result<*mut u8, ReallocationError>Expand description
Reallocates memory allocated by alloc.
ยงErrors
AllocationErrorifalloc()failsDeallocationErroriffree(ptr)failsFreeFailedTwiceiffree(ptr)fails and freeing the newly allocate pointer also failsImproperAlignmentifptris not properly alignedInvalidPointerifptrwas not allocated byallocor is invalidUseAfterFreeif you try torealloca freed pointer