aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-16 19:48:05 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-16 19:48:05 +0100
commitdd88fe9cff0b53154b74f447e26861c3c74277b6 (patch)
tree0c9d64765b7897d05c115f2cc3d82dc655d5ebe3 /doc
parentwork around regression in texinfo 6.0 (diff)
downloadslibc-dd88fe9cff0b53154b74f447e26861c3c74277b6.tar.gz
slibc-dd88fe9cff0b53154b74f447e26861c3c74277b6.tar.bz2
slibc-dd88fe9cff0b53154b74f447e26861c3c74277b6.tar.xz
info: doc mallocz
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/info/chap/memory-allocation.texinfo16
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/info/chap/memory-allocation.texinfo b/doc/info/chap/memory-allocation.texinfo
index 0ef4982..20136b0 100644
--- a/doc/info/chap/memory-allocation.texinfo
+++ b/doc/info/chap/memory-allocation.texinfo
@@ -454,7 +454,7 @@ memory, which should be deallocated to avoid
memory leaks.
@end table
-@file{<malloc.h>} also includes three unportable
+@file{<malloc.h>} also includes four unportable
functions.
@table @code
@item void* zalloc(size_t size)
@@ -466,6 +466,18 @@ does not overflow, @code{calloc(a, b)} is identical
to @code{zalloc(a * b)}. @code{zalloc} is a
@command{klibc} extension.
+@item void* mallocz(size_t size, int clear)
+@fnindex mallocz
+This function is similar to @code{malloc}. However,
+it has one second parameter. If the second parameter
+is non-zero, the allocated memory will be initialised.
+
+@code{mallocz(size, clear)} is identical to
+@code{(clear ? zalloc : malloc)(size)}.
+
+This function is a Plan 9 from Bell Labs extension
+and requires @code{_PLAN9_SOURCE}.
+
@item void cfree(void* ptr, ...)
@fnindex cfree
This function is an obsolete function provided
@@ -473,7 +485,7 @@ by a number of C standard library implementations.
It has been replaced by @code{free}. @code{cfree}
is identical to @code{free}.
-Different implementions @command{libc}, defined
+Different implementions of @command{libc}, defined
@code{cfree} with different numbers of parameters,
therefore @code{slibc} declares @code{cfree} as
a variadic function, and ignores all but the first