summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkeramida <keramida@FreeBSD.org>2002-06-06 22:11:19 +0000
committerkeramida <keramida@FreeBSD.org>2002-06-06 22:11:19 +0000
commitdf281667d31d06efb78224d4082c214fa312def0 (patch)
tree2b8b7f87e5c31d8b24b441f51f42f84efb02de71 /lib
parentd11731ff431780a9d55268d2c478bdd517945657 (diff)
downloadFreeBSD-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')
-rw-r--r--lib/libc/stdlib/malloc.35
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 .
OpenPOWER on IntegriCloud