函数逻辑报告 |
Source Code:mm\mmap.c |
Create Date:2022-07-27 16:16:05 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor
函数原型: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)
返回类型:struct vm_area_struct
参数:
类型 | 参数 | 名称 |
---|---|---|
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 | 如果vm_flags按位与Special vmas that are non-mergable, non-mlock()able.* Note: mm/huge_memory.c VM_NO_THP depends on this definition.则返回:NULL |
1133 | 否则next等于 list of VMAs |
1136 | 如果area且The first byte after our end addresswithin vm_mm. 恒等于end则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 | 如果err则返回:NULL |
1173 | 返回:prev |
1187 | 否则 |
1197 | 如果err则返回:NULL |
1200 | 返回:area |
1203 | 返回:NULL |
名称 | 描述 |
---|---|
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 | |
mlock_fixup | mlock_fixup - handle mlock[all]/munlock[all] requests.* Filters out "special" vmas -- VM_LOCKED never gets set for these, and* munlock is a no-op. However, for some special vmas, we go ahead and* populate the ptes. |
userfaultfd_release |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |