函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Note that interrupts must be enabled when calling this function.

函数原型:int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, void **p)

返回类型:int

参数:

类型参数名称
struct kmem_cache *s
gfp_tflags
size_tsize
void **p
3143  s等于slab_pre_alloc_hook(s, flags)
3144  如果此条件成立可能性小(为编译器优化)(!s)则返回:false
3151  禁止中断()
3152  c等于this_cpu_ptr(cpu_slab)
3154 i小于size循环
3155  object等于 Pointer to next available object
3167  c等于this_cpu_ptr(cpu_slab)
3170  继续下一循环
3172  Pointer to next available object 等于get_freepointer(s, object)
3173  p[i]等于object
3174  If the object has been wiped upon free, make sure it's fully initialized by* zeroing out freelist pointer.
3176  Globally unique transaction id 等于next_tid( Globally unique transaction id )
3177  开中断()
3180  如果此条件成立可能性小(为编译器优化)(slab_want_init_on_alloc(flags, s))则
3183 j小于i循环memset(p[j], 0, The size of an object without metadata )
3188  slab_post_alloc_hook(s, flags, size, p)
3189  返回:i
3190  error :
3191  开中断()
3192  slab_post_alloc_hook(s, flags, i, p)
3193  __kmem_cache_free_bulk(s, i, p)
3194  返回:0
调用者
名称描述
do_kmem_cache_size_bulk