Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Return true if the calling process may expand its vm space by the passed* number of pages

Proto:bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)

Type:bool

Parameter:

TypeParameterName
struct mm_struct *mm
vm_flags_tflags
unsigned longnpages
3268  If Total pages mapped + npages > rlimit(RLIMIT_AS) >> PAGE_SHIFT determines the page size Then Return false
3271  If Data area - private, writable, not stack && VM_WRITE & ~VM_SHARED & ~VM_STACK + npages > rlimit(RLIMIT_DATA) >> PAGE_SHIFT determines the page size Then
3274  If rlimit(RLIMIT_DATA) == 0 && VM_WRITE & ~VM_SHARED & ~VM_STACK + npages <= rlimit_max(RLIMIT_DATA) >> PAGE_SHIFT determines the page size Then Return true
3278  pr_warn_once("%s (%d): VmData %lu exceed data ulimit %lu. Update limits%s.\n", comm, pid, ( VM_WRITE & ~VM_SHARED & ~VM_STACK + npages) << PAGE_SHIFT determines the page size , rlimit(RLIMIT_DATA), ignore_rlimit_data ? "" : " or use boot option ignore_rlimit_data")
3284  If Not ignore_rlimit_data Then Return false
3288  Return true
Caller
NameDescribe
mmap_region
acct_stack_growthVerify that the stack growth is acceptable and* update accounting. This is shared with both the
do_brk_flagshis is really a simplified "do_mmap". it only handles* anonymous maps. eventually we may be able to do some* brk-specific accounting here.
mprotect_fixup
vma_to_resize