函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-27 14:04:10
Last Modify:2022-05-19 18:06:12 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__bpf_map_area_alloc

函数原型:static void *__bpf_map_area_alloc(u64 size, int numa_node, bool mmapable)

返回类型:void

参数:

类型参数名称
u64size
intnuma_node
boolmmapable
143  flags等于DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.按位或__GFP_ZERO
146  如果size大于等于SIZE_MAX则返回:NULL
150  如果非mmapablesize小于等于PAGE_SIZE左移PAGE_ALLOC_COSTLY_ORDER is the order at which allocations are deemed* costly to service. That is between allocation orders which should* coalesce naturally under reasonable reclaim pressure and those which* will not.位则
151  area等于kmalloc_node(size, GFP_USER | __GFP_NORETRY | flags, numa_node)
153  如果(area != NULL)则返回:area
156  如果mmapable
157  BUG_ON(!st whether an address (unsigned long or pointer) is aligned to PAGE_SIZE (size))
158  返回:vmalloc_user_node_flags(size, numa_node, GFP_KERNEL | __GFP_RETRY_MAYFAIL | flags)
161  返回:__vmalloc_node_flags_caller(size, numa_node, GFP_KERNEL | __GFP_RETRY_MAYFAIL | flags, __builtin_return_address(0))
调用者
名称描述
bpf_map_area_alloc
bpf_map_area_mmapable_alloc