This is a Hardware specific function. It is not implemented in the Compiler.
#include <stdlib.h>
void *realloc(void *ptr, size_t size);
realloc() changes the size of a block of memory, preserving its contents. ptr must be a pointer returned by calloc(), malloc(), realloc(), or NULL. In the latter case, realloc() is equivalent to malloc().
If the new size of the memory block is smaller than the old size, realloc() discards that memory at the end of the block. If size is zero (and ptr is not NULL), realloc() frees the whole memory block.
If there is not enough memory to perform the realloc(), the old memory block is left unchanged, and realloc() returns NULL. Do not use the default implementation in interrupt routines because it is not reentrant.
realloc() returns a pointer to the new memory block. If the operation cannot be performed, the return value is NULL.