Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vm_stat_account

Proto:void vm_stat_account(struct mm_struct *mm, vm_flags_t flags, long npages)

Type:void

Parameter:

TypeParameterName
struct mm_struct *mm
vm_flags_tflags
longnpages
3293  Total pages mapped += npages
3295  If Executable code area - executable, not writable, not stack Then VM_EXEC & ~VM_WRITE & ~VM_STACK += npages
3297  Else if Stack area - atomatically grows in one direction* VM_GROWSUP / VM_GROWSDOWN VMAs are always private anonymous:* do_mmap() forbids all other combinations. Then VM_STACK += npages
3299  Else if Data area - private, writable, not stack Then VM_WRITE & ~VM_SHARED & ~VM_STACK += npages
Caller
NameDescribe
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.