void *ptr is a (void *) pointer to a block of memory. If the pointer was not created by MALLOC, CALLOC, or STRDUP, the behavior is undefined.
int size is the number of bytes to allocate.