[][src]Function arrow::memory::reallocate

pub unsafe fn reallocate(
    ptr: *mut u8,
    old_size: usize,
    new_size: usize
) -> *mut u8

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).