Clarify the bit about realloc() and its `ptr' argument a bit.
Hopefully, now it is more clear that the memory referenced by the ptr argument of realloc(ptr,size) is freed and only the return value of realloc() points to a valid memory area upon successful completion. Submitted by: Martin Faxer <gmh003532@brfmasthugget.se>
This commit is contained in:
parent
88314a4e95
commit
d7a938ebc8
@ -117,8 +117,9 @@ is returned and
|
||||
the memory referenced by
|
||||
.Fa ptr
|
||||
is valid and unchanged.
|
||||
If memory can be allocated, a pointer to the newly allocated portion of
|
||||
the memory is returned.
|
||||
If memory can be allocated, the memory referenced by
|
||||
.Fa ptr
|
||||
is freed and a pointer to the newly allocated memory is returned.
|
||||
Note that this may be different from the value
|
||||
passed as
|
||||
.Fa ptr .
|
||||
|
Loading…
Reference in New Issue
Block a user