realloc:
void * realloc ( void * ptr, size_t size );
Reallocate memory block
In case that ptr is NULL, the function behaves exactly as MALLOC, assigning a new block of size bytes and returning a pointer to the beginning of it.
eg. realloc (NULL, sizeof(int));
In case that the size is 0, the memory previously allocated in ptr is deallocated as if a call to free was made, and a NULL pointer is returned.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment