aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2010-10-18 11:26:42 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2010-10-18 11:26:42 +0200
commit655d270c45e57aea5a3ae9c96959c2a11cfbd02f (patch)
treed83cf44ccd873c261b537bee5f77315993725672
parentb4b57a956078b5d9ea8f90fe0f36447d5bed310a (diff)
downloadman-pages-655d270c45e57aea5a3ae9c96959c2a11cfbd02f.tar.gz
malloc.3: Emphasize that malloc() and realloc() do not initialize allocated memory
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/malloc.310
1 files changed, 6 insertions, 4 deletions
diff --git a/man3/malloc.3 b/man3/malloc.3
index faba11ee02..4067aeab05 100644
--- a/man3/malloc.3
+++ b/man3/malloc.3
@@ -25,7 +25,7 @@
.\" Documented MALLOC_CHECK_, Wolfram Gloger (wmglo@dent.med.uni-muenchen.de)
.\" 2007-09-15 mtk: added notes on malloc()'s use of sbrk() and mmap().
.\"
-.TH MALLOC 3 2010-10-03 "GNU" "Linux Programmer's Manual"
+.TH MALLOC 3 2010-10-18 "GNU" "Linux Programmer's Manual"
.SH NAME
malloc, free, calloc, realloc \- Allocate and free dynamic memory
.SH SYNOPSIS
@@ -44,7 +44,7 @@ The
function allocates
.I size
bytes and returns a pointer to the allocated memory.
-The memory is not cleared.
+.IR "The memory is not initialized" .
If
.I size
is 0, then
@@ -97,8 +97,10 @@ to
.I size
bytes.
The contents will be unchanged in the range from the start of the region
-up to the minimum of the old and new sizes;
-newly allocated memory will be uninitialized.
+up to the minimum of the old and new sizes.
+If the new size is larger than the old size, the added memory will
+.I not
+be initialized.
If
.I ptr
is NULL, then the call is equivalent to