函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab_common.c Create Date:2022-07-27 15:53:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Figure out what the alignment of the objects will be given a set of* flags, a user specified alignment and the size of the objects.

函数原型:static unsigned int calculate_alignment(slab_flags_t flags, unsigned int align, unsigned int size)

返回类型:unsigned int

参数:

类型参数名称
slab_flags_tflags
unsigned intalign
unsigned intsize
291  如果flags按位与Align objs on cache lines
294  ralign等于cache_line_size()
295 size小于等于ralign除2循环
296  ralign除等于2
297  align等于两数取大(align, ralign)
300  如果align小于Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment.* Intended for arches that get misalignment faults even for 64 bit integer* aligned buffers.align等于Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment.* Intended for arches that get misalignment faults even for 64 bit integer* aligned buffers.
303  返回:@a is a power of 2 value (align, *的长度)
调用者
名称描述
find_mergeable
kmem_cache_create_usercopykmem_cache_create_usercopy - Create a cache with a region suitable* for copying to userspace*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.