Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mmap.c Create Date:2022-07-28 14:49:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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;

Proto:unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags)

Type:unsigned long

Parameter:

TypeParameterName
struct file *filp
unsigned longaddr
unsigned longlen
unsigned longpgoff
unsigned longflags
2082  mm = mm
2085  mmap_end = arch_get_mmap_end(addr)
2087  If len > mmap_end - mmap_min_addr Then Return -ENOMEM
2090  If flags & Interpret addr exactly Then Return addr
2093  If addr Then
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  If mmap_end - len >= addr && addr >= mmap_min_addr && ( Not vma || addr + len <= vm_start_gap(vma) ) && ( Not prev || addr >= vm_end_gap(prev) ) Then Return addr
2102  flags = 0
2103  length = len
2104  low_limit = base of mmap area
2105  high_limit = mmap_end
2106  align_mask = 0
2107  Return Search for an unmapped address range