Function report |
Source Code:mm\mlock.c |
Create Date:2022-07-28 14:45:48 |
Last Modify:2022-05-23 14:12:58 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm, unsigned long start, size_t len)
Type:unsigned long
Parameter:
Type | Parameter | Name |
---|---|---|
struct mm_struct * | mm | |
unsigned long | start | |
size_t | len |
643 | count = 0 |
649 | If (vma == NULL) Then vma = list of VMAs |
653 | If start >= The first byte after our end addresswithin vm_mm. Then Continue |
655 | If start + len <= Our start address within vm_mm. Then Break |
657 | If Flags, see mm.h. & VM_LOCKED Then |
658 | If start > Our start address within vm_mm. Then count -= start - Our start address within vm_mm. |
660 | If start + len < The first byte after our end addresswithin vm_mm. Then |
661 | count += start + len - Our start address within vm_mm. |
662 | Break |
668 | Return count >> PAGE_SHIFT determines the page size |
Name | Describe |
---|---|
do_mlock |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |