diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-11-16 19:48:05 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-11-16 19:48:05 +0100 |
commit | dd88fe9cff0b53154b74f447e26861c3c74277b6 (patch) | |
tree | 0c9d64765b7897d05c115f2cc3d82dc655d5ebe3 | |
parent | work around regression in texinfo 6.0 (diff) | |
download | slibc-dd88fe9cff0b53154b74f447e26861c3c74277b6.tar.gz slibc-dd88fe9cff0b53154b74f447e26861c3c74277b6.tar.bz2 slibc-dd88fe9cff0b53154b74f447e26861c3c74277b6.tar.xz |
info: doc mallocz
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r-- | doc/info/chap/memory-allocation.texinfo | 16 |
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 |