函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mlock.c Create Date:2022-07-27 16:13:28
Last Modify:2022-05-23 14:12:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Go through vma areas and sum size of mlocked* vma pages, as return value.* Note deferred memory locking case(mlock2(,,MLOCK_ONFAULT)* is also counted.* Return value: previously mlocked page counts

函数原型:static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm, unsigned long start, size_t len)

返回类型:unsigned long

参数:

类型参数名称
struct mm_struct *mm
unsigned longstart
size_tlen
643  count等于0
645  如果(mm == NULL)则mm等于mm
648  vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
649  如果(vma == NULL)则vma等于 list of VMAs
652 vma循环
653  如果start大于等于The first byte after our end addresswithin vm_mm. 则继续下一循环
655  如果startlen小于等于Our start address within vm_mm. 退出
657  如果Flags, see mm.h. 按位与VM_LOCKED
668  返回:count右移PAGE_SHIFT determines the page size
调用者
名称描述
do_mlock