diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/malloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
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. |