#include <stdlib.h>
void xdata *realloc (
void xdata *p, /* previously allocated block */
unsigned int size); /* new size for block */
Description
The realloc function changes the size of a previously
allocated memory block. The p argument points to
the allocated block and size specifies the new
size for the block. The contents of the existing block are copied to
the new block. Any additional area in the new block, due to a larger
block size, is not initialized.
Note
Before calling this function your program must invoke the
init_mempool function
to initialize the memory management routines and provides the
starting address and size of the memory pool.
Source code for this routine is provide in the LIB
folder. You may modify the source to customize this function for
your particular hardware environment.
Return Value
The realloc function returns a pointer to the new block. If
there is not enough memory in the memory pool to satisfy the memory
request, a null pointer is returned and the original memory block is
not affected.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.