diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-05-31 13:50:38 +0300 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-06-01 09:22:46 +0300 |
commit | a234bdc9aecc299ba41ffe8023b3ea110df9f51b (patch) | |
tree | 08b71ab1fc445f6ac64b2cb96b615e0e10833b46 /mm/util.c | |
parent | 59a3759d0fe8d969888c741bb33f4946e4d3750d (diff) | |
download | op-kernel-dev-a234bdc9aecc299ba41ffe8023b3ea110df9f51b.zip op-kernel-dev-a234bdc9aecc299ba41ffe8023b3ea110df9f51b.tar.gz |
slab: document kzfree() zeroing behavior
As suggested by Alan Cox, document the fact that kzfree() can zero out a great
deal more memory than the what the user requested from kmalloc().
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/util.c')
-rw-r--r-- | mm/util.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) { |