aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/malloc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/malloc.h b/include/malloc.h
index f4a910a..d6f0be5 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -77,6 +77,10 @@ void* calloc(size_t, size_t)
/**
* 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.