diff options
author | keramida <keramida@FreeBSD.org> | 2002-06-06 22:11:19 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2002-06-06 22:11:19 +0000 |
commit | df281667d31d06efb78224d4082c214fa312def0 (patch) | |
tree | 2b8b7f87e5c31d8b24b441f51f42f84efb02de71 /lib/libc/stdlib/malloc.3 | |
parent | d11731ff431780a9d55268d2c478bdd517945657 (diff) | |
download | FreeBSD-src-df281667d31d06efb78224d4082c214fa312def0.zip FreeBSD-src-df281667d31d06efb78224d4082c214fa312def0.tar.gz |
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>
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r-- | lib/libc/stdlib/malloc.3 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 328ee1a..65173cf 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -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 . |