diff options
author | Christoph Lameter <cl@linux.com> | 2012-11-28 16:23:16 +0000 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-12-11 12:14:28 +0200 |
commit | 4590685546a374fb0f60682ce0e3a6fd48911d46 (patch) | |
tree | 1287ce1e1633067f8bf2cf9f93f1d6fe8a1f8908 /mm/slab.h | |
parent | 2f9baa9fcf8d0a204ca129a671d6086cc100faab (diff) | |
download | op-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |