函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.h Create Date:2022-07-27 15:27:25
Last Modify:2022-05-23 16:25:42 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:slab_post_alloc_hook

函数原型:static inline void slab_post_alloc_hook(struct kmem_cache *s, gfp_t flags, size_t size, void **p)

返回类型:void

参数:

类型参数名称
struct kmem_cache *s
gfp_tflags
size_tsize
void **p
582  flags与等于gfp_allowed_mask is set to GFP_BOOT_MASK during early boot to restrict what* GFP flags are used before interrupts are enabled
583 i小于size循环
584  p[i]等于kasan_slab_alloc(s, p[i], flags)
586  kmemleak_alloc_recursive(p[i], The size of an object without metadata , 1, Used for retrieving partial slabs, etc. , flags)
590  如果memcg_kmem_enabled()则memcg_kmem_put_cache(s)
调用者
名称描述
slab_alloc_node
slab_alloc
kmem_cache_alloc_bulk
slab_alloc_nodeInlined fastpath so that allocation functions (kmalloc, kmem_cache_alloc)* have the fastpath folded into their functions. So no function call* overhead for requests that can be satisfied on the fastpath.
kmem_cache_alloc_bulkNote that interrupts must be enabled when calling this function.