summaryrefslogtreecommitdiffstats
path: root/mm/slab.h
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-11-28 16:23:16 +0000
committerPekka Enberg <penberg@kernel.org>2012-12-11 12:14:28 +0200
commit4590685546a374fb0f60682ce0e3a6fd48911d46 (patch)
tree1287ce1e1633067f8bf2cf9f93f1d6fe8a1f8908 /mm/slab.h
parent2f9baa9fcf8d0a204ca129a671d6086cc100faab (diff)
downloadop-kernel-dev-4590685546a374fb0f60682ce0e3a6fd48911d46.zip
op-kernel-dev-4590685546a374fb0f60682ce0e3a6fd48911d46.tar.gz
mm/sl[aou]b: Common alignment code
Extract the code to do object alignment from the allocators. Do the alignment calculations in slab_common so that the __kmem_cache_create functions of the allocators do not have to deal with alignment. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slab.h')
-rw-r--r--mm/slab.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/slab.h b/mm/slab.h
index 492eafa..1cb9c9e 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -32,6 +32,9 @@ extern struct list_head slab_caches;
/* The slab cache that manages slab cache information */
extern struct kmem_cache *kmem_cache;
+unsigned long calculate_alignment(unsigned long flags,
+ unsigned long align, unsigned long size);
+
/* Functions provided by the slab allocators */
extern int __kmem_cache_create(struct kmem_cache *, unsigned long flags);
OpenPOWER on IntegriCloud