Function mupdf_sys::fz_realloc
source · pub unsafe extern "C" fn fz_realloc(
ctx: *mut fz_context,
p: *mut c_void,
size: usize
) -> *mut c_void
Expand description
Reallocates a block of memory to given size. Existing contents up to min(old_size,new_size) are maintained. The rest of the block is uninitialised.
fz_realloc(ctx, NULL, size) behaves like fz_malloc(ctx, size).
fz_realloc(ctx, p, 0); behaves like fz_free(ctx, p).
Throws exception in the event of failure to allocate.