Function arrow::alloc::reallocate
source · [−]pub unsafe fn reallocate<T: NativeType>(
ptr: NonNull<T>,
old_size: usize,
new_size: usize
) -> NonNull<T>
Expand description
Safety
This function is unsafe because undefined behavior can result if the caller does not ensure all of the following:
-
ptr must be currently allocated via this allocator,
-
new_size must be greater than zero.
-
new_size, when rounded up to the nearest multiple of ALIGNMENT, must not overflow (i.e., the rounded value must be less than usize::MAX).