]> git.baikalelectronics.ru Git - kernel.git/commit
slab: introduce krealloc
authorPekka Enberg <penberg@cs.helsinki.fi>
Sun, 6 May 2007 21:48:40 +0000 (14:48 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:12:50 +0000 (12:12 -0700)
commit6aa4b740c8f0400c9aa44036fbffdc00c931aa34
tree66f310ab9d7cdadfb79486700f1e01df7923ec14
parentc7fbf5e9775549ac6d70abd323bada290657427c
slab: introduce krealloc

This introduce krealloc() that reallocates memory while keeping the contents
unchanged.  The allocator avoids reallocation if the new size fits the
currently used cache.  I also added a simple non-optimized version for
mm/slob.c for compatibility.

[akpm@linux-foundation.org: fix warnings]
Acked-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Acked-by: Matt Mackall <mpm@selenic.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/slab.h
mm/slab.c
mm/slob.c