realloc
Resizes a heap block and keeps its contents, but may move it. Store its result in a temporary pointer and check for NULL, so a failure doesn't lose your only pointer to the old block.
Resizes a heap block and keeps its contents, but may move it. Store its result in a temporary pointer and check for NULL, so a failure doesn't lose your only pointer to the old block.