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
ba2cd77062
commit
f2572d955f
@ -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