函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mlock_future_check

函数原型:static inline int mlock_future_check(struct mm_struct *mm, unsigned long flags, unsigned long len)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
unsigned longflags
unsigned longlen
1321  如果flags按位与VM_LOCKED
1322  locked等于len右移PAGE_SHIFT determines the page size
1323  locked加等于 Pages that have PG_mlocked set
1324  lock_limit等于rlimit(RLIMIT_MEMLOCK)
1325  lock_limit右移等于PAGE_SHIFT determines the page size
1326  如果locked大于lock_limit且非操作权限检查则返回:负EAGAIN
1329  返回:0
调用者
名称描述
do_mmapThe caller must hold down_write(¤t->mm->mmap_sem).
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.