array = malloc(<capacity>);
// do stuff with array
free(array);
...
array = malloc(<new capacity>);
// do stuff with array
free(array);
with no other allocations in between then it is possible that the allocator might reuse previously freed array space.
I'm not sure I follow. What is the distinction here?