函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Return true if the calling process may expand its vm space by the passed* number of pages

函数原型:bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)

返回类型:bool

参数:

类型参数名称
struct mm_struct *mm
vm_flags_tflags
unsigned longnpages
3268  如果 Total pages mapped npages大于rlimit(RLIMIT_AS)右移PAGE_SHIFT determines the page size 位则返回:false
3271  如果Data area - private, writable, not stack VM_WRITE & ~VM_SHARED & ~VM_STACK npages大于rlimit(RLIMIT_DATA)右移PAGE_SHIFT determines the page size 位则
3274  如果rlimit(RLIMIT_DATA)恒等于0且 VM_WRITE & ~VM_SHARED & ~VM_STACK npages小于等于rlimit_max(RLIMIT_DATA)右移PAGE_SHIFT determines the page size 位则返回: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  如果非ignore_rlimit_data则返回:false
3288  返回:true
调用者
名称描述
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