函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:count_vma_pages_range

函数原型:static unsigned long count_vma_pages_range(struct mm_struct *mm, unsigned long addr, unsigned long end)

返回类型:unsigned long

参数:

类型参数名称
struct mm_struct *mm
unsigned longaddr
unsigned longend
563  nr_pages等于0
567  vma等于Look up the first VMA which intersects the interval start_addr..end_addr-1,NULL if none. Assume start_addr < end_addr.
568  如果非vma则返回:0
571  nr_pages等于两数取小(end, The first byte after our end addresswithin vm_mm. )减两数取大(addr, Our start address within vm_mm. )右移PAGE_SHIFT determines the page size
575 vma循环
578  如果Our start address within vm_mm. 大于end退出
581  overlap_len等于两数取小(end, The first byte after our end addresswithin vm_mm. )减Our start address within vm_mm.
582  nr_pages加等于overlap_len右移PAGE_SHIFT determines the page size
585  返回:nr_pages
调用者
名称描述
mmap_region