aboutsummaryrefslogtreecommitdiffstats
path: root/man3/malloc.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/malloc.3')
-rw-r--r--man3/malloc.319
1 files changed, 16 insertions, 3 deletions
diff --git a/man3/malloc.3 b/man3/malloc.3
index 104cbd12a4..6550f228b0 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 2008-02-22 "GNU" "Linux Programmer's Manual"
+.TH MALLOC 3 2008-04-05 "GNU" "Linux Programmer's Manual"
.SH NAME
calloc, malloc, free, realloc \- Allocate and free dynamic memory
.SH SYNOPSIS
@@ -124,8 +124,21 @@ For
.BR calloc ()
and
.BR malloc (),
-the value returned is a pointer to the allocated memory, which is suitably
-aligned for any kind of variable, or NULL if the request fails.
+return a pointer to the allocated memory, which is suitably
+aligned for any kind of variable.
+On error, these functions return NULL.
+NULL may also be returned by a successful call to
+.BR malloc ()
+with a
+.I size
+of zero,
+or by a successful call to
+.BR realloc ()
+with
+.I nmemb
+or
+.I size
+equal to zero.
.PP
.BR free ()
returns no value.