函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__get_vm_area_node

函数原型:static struct vm_struct *__get_vm_area_node(unsigned long size, unsigned long align, unsigned long flags, unsigned long start, unsigned long end, int node, gfp_t gfp_mask, const void *caller)

返回类型:struct vm_struct

参数:

类型参数名称
unsigned longsize
unsigned longalign
unsigned longflags
unsigned longstart
unsigned longend
intnode
gfp_tgfp_mask
const void *caller
2091  requested_size等于size
2093  BUG_ON(in_interrupt())
2094  size等于 align the pointer to the (next) page boundary (size)
2095  如果此条件成立可能性小(为编译器优化)(!size)则返回:NULL
2098  如果flags按位与remap() and friends align等于1ul左移clamp_t - return a value clamped to a given range using a given type*@type: the type of variable to use*@val: current value*@lo: minimum allowable value*@hi: maximum allowable value* This macro does no typechecking and uses temporary variables of type(int, get_count_order_long - get order after rounding @l up to power of 2*@l: parameter* it is same as get_count_order() but with long type parameter, PAGE_SHIFT determines the page size , IOREMAP_MAX_ORDER)位
2102  area等于根据内存节点分配内存
2103  如果此条件成立可能性小(为编译器优化)(!area)则返回:NULL
2106  如果非flags按位与don't add guard page 的值则size加等于PAGE_SIZE
2109  va等于Allocate a region of KVA of the specified size and alignment, within the* vstart and vend.
2110  如果是错误
2111  释放内存
2112  返回:NULL
2115  kasan_unpoison_vmalloc((void * )va_start, requested_size)
2117  setup_vmalloc_vm(area, va, flags, caller)
2119  返回:area
调用者
名称描述
__get_vm_area
__get_vm_area_caller
get_vm_areaget_vm_area - reserve a contiguous kernel virtual area*@size: size of the area*@flags: %VM_IOREMAP for I/O mappings or VM_ALLOC* Search an area of @size in the kernel virtual mapping area,* and reserved it for out purposes. Returns the area descriptor
get_vm_area_caller
__vmalloc_node_range__vmalloc_node_range - allocate virtually contiguous memory*@size: allocation size*@align: desired alignment*@start: vm area range start*@end: vm area range end*@gfp_mask: flags for the page level allocator*@prot: protection mask for the allocated pages