/* Figure out what the alignment of the objects will be.  */
static unsigned long calculate_alignment(unsigned long flags, unsigned long align, unsigned long size)
/* Figure out what the alignment of the objects will be.  */
static unsigned long calculate_alignment(unsigned long flags, unsigned long align, unsigned long size)
{
	if (flags & SLAB_HWCACHE_ALIGN) {
		unsigned long ralign = cache_line_size();
		while (size <= ralign / 2)
			ralign /= 2;
		align = max(align, ralign);
	}
	if (align < ARCH_SLAB_MINALIGN)
		align = ARCH_SLAB_MINALIGN;
	return ALIGN(align, sizeof(void *));
}