Function report |
Source Code:mm\mmap.c |
Create Date:2022-07-28 14:48:03 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor
Proto:struct vm_area_struct *vma_merge(struct mm_struct *mm, struct vm_area_struct *prev, unsigned long addr, unsigned long end, unsigned long vm_flags, struct anon_vma *anon_vma, struct file *file, unsigned long pgoff, struct mempolicy *policy, struct vm_userfaultfd_ctx vm_userfaultfd_ctx)
Type:struct vm_area_struct
Parameter:
Type | Parameter | Name |
---|---|---|
struct mm_struct * | mm | |
struct vm_area_struct * | prev | |
unsigned long | addr | |
unsigned long | end | |
unsigned long | vm_flags | |
struct anon_vma * | anon_vma | |
struct file * | file | |
unsigned long | pgoff | |
struct mempolicy * | policy | |
struct vm_userfaultfd_ctx | vm_userfaultfd_ctx |
1120 | pglen = end - addr >> PAGE_SHIFT determines the page size |
1128 | If vm_flags & Special vmas that are non-mergable, non-mlock()able.* Note: mm/huge_memory.c VM_NO_THP depends on this definition. Then Return NULL |
1131 | If prev Then next = linked list of VM areas per task, sorted by address |
1133 | Else next = list of VMAs |
1136 | If area && The first byte after our end addresswithin vm_mm. == end Then next = linked list of VM areas per task, sorted by address |
1140 | VM_WARN_ON(prev && addr <= Our start address within vm_mm. ) |
1142 | VM_WARN_ON(addr >= end) |
1170 | If err Then Return NULL |
1173 | Return prev |
1187 | Else |
1197 | If err Then Return NULL |
1200 | Return area |
1203 | Return NULL |
Name | Describe |
---|---|
mmap_region | |
do_brk_flags | his is really a simplified "do_mmap". it only handles* anonymous maps. eventually we may be able to do some* brk-specific accounting here. |
copy_vma | Copy the vma structure to a new location in the same mm,* prior to moving page table entries, to effect an mremap move. |
mprotect_fixup | |
madvise_behavior | We can potentially split a vm area into separate* areas, each area with its own behavior. |
mbind_range | Step 2: apply policy to a range and do splits. |
userfaultfd_register | |
userfaultfd_unregister |
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 |