函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Returns a start address of the newly allocated area, if success.* Otherwise a vend is returned that indicates failure.

函数原型:static __always_inline unsigned long __alloc_vmap_area(unsigned long size, unsigned long align, unsigned long vstart, unsigned long vend)

返回类型:unsigned long

参数:

类型参数名称
unsigned longsize
unsigned longalign
unsigned longvstart
unsigned longvend
1034  va等于Find the first free block(lowest start address) in the tree,* that will accomplish the request corresponding to passing* parameters.
1035  如果此条件成立可能性小(为编译器优化)(!va)则返回:vend
1038  如果va_start大于vstartnva_start_addr等于@a is a power of 2 value (va_start, align)
1040  否则nva_start_addr等于@a is a power of 2 value (vstart, align)
1044  如果nva_start_addrsize大于vend则返回:vend
1048  type等于classify_va_fit_type(va, nva_start_addr, size)
1049  如果WARN_ON_ONCE(type == NOTHING_FIT)则返回:vend
1053  ret等于adjust_va_to_fit_type(va, nva_start_addr, size, type)
1054  如果ret则返回:vend
1061  返回:nva_start_addr
调用者
名称描述
alloc_vmap_areaAllocate a region of KVA of the specified size and alignment, within the* vstart and vend.