+ * talloc_array_length - get the number of elements in a talloc array
+ * @p: the talloc pointer whose allocation to measure.
+ *
+ * This assumes that @p has been allocated as the same type. NULL returns 0.
+ *
+ * See Also:
+ * talloc_get_size
+ */
+#define talloc_array_length(p) (talloc_get_size(p) / sizeof((*p)))
+
+/**
+ * talloc_get_size - get the requested size of an allocation