summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/malloc.3
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-11-12 16:41:21 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-11-12 16:41:21 +0000
commit0d052386ba9f2ab5751c9d7176ecd7e396de65e0 (patch)
treef2713aba3343533baa67265810fe3cd6464e5508 /lib/libc/stdlib/malloc.3
parentbd8ae5d0d7ae5bc7d9785de5ce675116a1241b5b (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r--lib/libc/stdlib/malloc.311
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index de93382fe478..764bad1033de 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -73,6 +73,12 @@ If
.Fn malloc
fails, a NULL pointer is returned.
.Pp
+Note that
+.Fn malloc
+does
+.Em NOT
+normally initialize the returned memory to zero bytes.
+.Pp
The
.Fn calloc
function allocates space for
@@ -85,7 +91,8 @@ The result is identical to calling
.Fn malloc
with an argument of
.Dq "number * size" ,
-with the exception that the allocated memory is initialized to nul bytes.
+with the exception that the allocated memory is explicitly initialized
+to zero bytes.
.Pp
The
.Fn realloc
@@ -310,7 +317,7 @@ options and symbols for debugger support.
If the program starts to give unusual results, coredump or generally behave
differently without emitting any of the messages listed in the next
section, it is likely because it depends on the storage being filled with
-nul bytes. Try running it with
+zero bytes. Try running it with
.Dq Z
option set;
if that improves the situation, this diagnosis has been confirmed.