If the area pointed to was moved, a
free(ptr) is done.
Can you please explain the above line about realloc()? This line is from a man page for calloc, malloc, realloc and free.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think this explains it better:
Reference taken from realloc in C