slab: document kzfree() zeroing behavior
[sfrench/cifs-2.6.git] / mm / util.c
index 55bef160b9f1484c032220b506f4ebfaeffe9a47..e79572b3684ccb9f467d42b4f18420640e706b07 100644 (file)
--- a/mm/util.c
+++ b/mm/util.c
@@ -166,6 +166,10 @@ EXPORT_SYMBOL(krealloc);
  *
  * The memory of the object @p points to is zeroed before freed.
  * If @p is %NULL, kzfree() does nothing.
+ *
+ * Note: this function zeroes the whole allocated buffer which can be a good
+ * deal bigger than the requested buffer size passed to kmalloc(). So be
+ * careful when using this function in performance sensitive code.
  */
 void kzfree(const void *p)
 {