mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
This commit is contained in:
parent
2f9baa9fcf
commit
4590685546
5 changed files with 34 additions and 69 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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue