Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mlock_future_check

Proto:static inline int mlock_future_check(struct mm_struct *mm, unsigned long flags, unsigned long len)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
unsigned longflags
unsigned longlen
1321  If flags & VM_LOCKED Then
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  If locked > lock_limit && Not Check operation authority Then Return -EAGAIN
1329  Return 0
Caller
NameDescribe
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.