函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Get an address range which is currently unmapped.* For shmat() with addr=0.* Ugly calling convention alert:* Return value with the low bits set means error value,* ie* if (ret & ~PAGE_MASK)* error = ret;

函数原型:unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags)

返回类型:unsigned long

参数:

类型参数名称
struct file *filp
unsigned longaddr
unsigned longlen
unsigned longpgoff
unsigned longflags
2082  mm等于mm
2085  mmap_end等于arch_get_mmap_end(addr)
2087  如果len大于mmap_endmmap_min_addr则返回:负ENOMEM
2090  如果flags按位与Interpret addr exactly 则返回:addr
2093  如果addr
2094  addr等于 align the pointer to the (next) page boundary (addr)
2095  vma等于Same as find_vma, but also return a pointer to the previous VMA in *pprev.
2096  如果mmap_endlen大于等于addraddr大于等于mmap_min_addr且非vmaaddrlen小于等于vm_start_gap(vma)的值且非prevaddr大于等于vm_end_gap(prev)的值则返回:addr
2102  flags等于0
2103  length等于len
2104  low_limit等于 base of mmap area
2105  high_limit等于mmap_end
2106  align_mask等于0
2107  返回:Search for an unmapped address range