diff options
author | Christoph Lameter <cl@linux.com> | 2012-11-28 11:23:16 -0500 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-12-11 05:14:28 -0500 |
commit | 4590685546a374fb0f60682ce0e3a6fd48911d46 (patch) | |
tree | 1287ce1e1633067f8bf2cf9f93f1d6fe8a1f8908 /mm/slab.h | |
parent | 2f9baa9fcf8d0a204ca129a671d6086cc100faab (diff) |
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; | |||
32 | /* The slab cache that manages slab cache information */ | 32 | /* The slab cache that manages slab cache information */ |
33 | extern struct kmem_cache *kmem_cache; | 33 | extern struct kmem_cache *kmem_cache; |
34 | 34 | ||
35 | unsigned long calculate_alignment(unsigned long flags, | ||
36 | unsigned long align, unsigned long size); | ||
37 | |||
35 | /* Functions provided by the slab allocators */ | 38 | /* Functions provided by the slab allocators */ |
36 | extern int __kmem_cache_create(struct kmem_cache *, unsigned long flags); | 39 | extern int __kmem_cache_create(struct kmem_cache *, unsigned long flags); |
37 | 40 | ||