]> pilppa.com Git - linux-2.6-omap-h63xx.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)
commitfd76bab2fa6d8f3ef6b326a4c6ae442fa21d30a4
tree66f310ab9d7cdadfb79486700f1e01df7923ec14
parente3ebadd95cb621e2c7436f3d3646447ac9d5c16d
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