Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:count_vma_pages_range

Proto:static unsigned long count_vma_pages_range(struct mm_struct *mm, unsigned long addr, unsigned long end)

Type:unsigned long

Parameter:

TypeParameterName
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  If Not vma Then Return 0
571  nr_pages = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(end, The first byte after our end addresswithin vm_mm. ) - max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(addr, Our start address within vm_mm. ) >> PAGE_SHIFT determines the page size
575  When vma cycle
578  If Our start address within vm_mm. > end Then Break
581  overlap_len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(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  Return nr_pages
Caller
NameDescribe
mmap_region