malloc.3: Emphasize that malloc() and realloc() do not initialize allocated memory

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2010-10-18 11:26:42 +02:00
parent b4b57a9560
commit 655d270c45
1 changed files with 6 additions and 4 deletions

View File

@ -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