函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vm_stat_account

函数原型:void vm_stat_account(struct mm_struct *mm, vm_flags_t flags, long npages)

返回类型:void

参数:

类型参数名称
struct mm_struct *mm
vm_flags_tflags
longnpages
3293  Total pages mapped 加等于npages
3295  如果Executable code area - executable, not writable, not stack VM_EXEC & ~VM_WRITE & ~VM_STACK 加等于npages
3297  否则如果Stack area - atomatically grows in one direction* VM_GROWSUP / VM_GROWSDOWN VMAs are always private anonymous:* do_mmap() forbids all other combinations. VM_STACK 加等于npages
3299  否则如果Data area - private, writable, not stack VM_WRITE & ~VM_SHARED & ~VM_STACK 加等于npages
调用者
名称描述
mmap_region
expand_downwardsvma is the first one with address < vma->vm_start. Have to extend vma.
remove_vma_listOk - we have the memory areas we should free on the vma list,* so release them, and do the vma updates.* Called with the mm semaphore held.
__install_special_mapping
mprotect_fixup
move_vma
SYSCALL_DEFINE5Expand (or shrink) an existing mapping, potentially moving it at the* same time (controlled by the MREMAP_MAYMOVE flag and available VM space)* MREMAP_FIXED option added 5-Dec-1999 by Benjamin LaHaise* This option implies MREMAP_MAYMOVE.
dup_mmap