Joona I Palaste said:
This would have to be an implementation-specific detail.
Is that really true, in respect to what the OP is asking?
The realloc, calloc and malloc functions all perform "magic"
behind the scenes, and the details are not available to the
programmer. But outwardly, "magic" is spelled the same for all
three.
Both the realloc and free functions can operate on a pointer
returned by any of the three. I think that is what the OP
probably meant by "is there any difference", and for the
programmer the answer is no, they are the same.
Of course, underneath they might accomplish "magic" in three
distinct ways... but that is of concern only to the implementor.