From d932648b0324288aaa4bb14a08a8d1f1be044036 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 14 Nov 2015 23:20:52 +0100 Subject: m doc mallocz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/malloc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/malloc.c b/src/malloc.c index 538f338..28824e9 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -129,6 +129,10 @@ void* calloc(size_t elem_count, size_t elem_size) /** * Variant of `malloc` that conditionally clears the allocation with zeroes. * + * `mallocz(size, clear)` is equivalent to + * both `(clear ? zalloc : malloc)(size)` + * and `(clear ? calloc(1, size) : malloc(size))`. + * * This is a Plan 9 from Bell Labs extension. * * @param size The size of the allocation. -- cgit v1.2.3-70-g09d2