Change the size of an allocated part of memory. The memory must have been allocated by malloc() or calloc(). If you reduce the size, the old contents will be lost. If you enlarge the size, the new contents will be undefined.
INPUTS
oldmen
What you got from malloc() or calloc().
size
The new size.
RESULT
A pointer to the allocated memory or NULL. If you don't need the memory anymore, you can pass this pointer to free(). If you don't, the memory will be freed for you when the application exits.
EXAMPLE
SEE ALSO
free(), malloc(), calloc()
NOTES
If you get NULL, the memory at oldmem will not have been freed and can still be used.
BUGS
INTERNALS
HISTORY
20.10.1998 hkiel
Amiga Research OS
13.06.1998 hkiel
Spellfix.
01.01.1997 ldp
Changed clib to proto
12.12.1996 aros
ANSI expects these functions in stdlib.h
10.12.1996 aros
Moved #include into first column to allow makedepend to see it.