slab: Common definition for the array of kmalloc caches
Have a common definition fo the kmalloc cache arrays in SLAB and SLUB Acked-by: Glauber Costa <glommer@parallels.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
parent
95a05b428c
commit
9425c58e54
6 changed files with 13 additions and 24 deletions
|
@ -206,6 +206,11 @@ struct kmem_cache {
|
|||
#define KMALLOC_MIN_SIZE (1 << KMALLOC_SHIFT_LOW)
|
||||
#endif
|
||||
|
||||
extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
|
||||
#ifdef CONFIG_ZONE_DMA
|
||||
extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Figure out which kmalloc slab an allocation of a certain size
|
||||
* belongs to.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue