函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slob.c Create Date:2022-07-27 17:09:50
Last Modify:2022-05-20 09:26:42 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:slob_alloc_node

函数原型:static void *slob_alloc_node(struct kmem_cache *c, gfp_t flags, int node)

返回类型:void

参数:

类型参数名称
struct kmem_cache *c
gfp_tflags
intnode
596  flags与等于gfp_allowed_mask
598  fs_reclaim_acquire(flags)
599  fs_reclaim_release(flags)
601  如果The size of an object including metadata 小于PAGE_SIZE
602  b等于slob_alloc: entry point into the slob allocator.
603  trace_kmem_cache_alloc_node(_RET_IP_, b, The size of an object without metadata , SLOB_UNITS(The size of an object including metadata ) * SLOB_UNIT, flags, node)
606  否则
607  b等于slob_new_pages(flags, get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory, node)
608  trace_kmem_cache_alloc_node(_RET_IP_, b, The size of an object without metadata , PAGE_SIZE << get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory, flags, node)
613  如果bctor
614  WARN_ON_ONCE(flags & __GFP_ZERO)
615  ctor(b)
618  kmemleak_alloc_recursive(b, The size of an object including metadata , 1, Used for retrieving partial slabs, etc. , flags)
619  返回:b
调用者
名称描述
kmem_cache_alloc分配高速缓存区
kmem_cache_alloc_node在指定节点上分配一个对象