.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\" %sccs.include.redist.man%
.\" @(#)realloc.3 8.2 (Berkeley) %G%
.Nd reallocation of memory function
.Fn realloc "void *ptr" "size_t size"
function changes the size of the object pointed to by
The contents of the object are unchanged up to the lesser
of the new and old sizes.
If the new size is larger, the value of the newly allocated portion
of the object is indeterminate.
function behaves like the
function for the specified size.
does not match a pointer earlier returned by the
function, or if the space has been deallocated
function, unpredictable and usually detrimental
If the space cannot be allocated, the object
is not a null pointer, the object it points to is freed.
function returns either a null pointer or a pointer
to the possibly moved allocated space.