函数逻辑报告 |
Source Code:mm\mmap.c |
Create Date:2022-07-27 16:18:37 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Copy the vma structure to a new location in the same mm,* prior to moving page table entries, to effect an mremap move.
函数原型:struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, unsigned long addr, unsigned long len, unsigned long pgoff, bool *need_rmap_locks)
返回类型:struct vm_area_struct
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct vm_area_struct ** | vmap | |
| unsigned long | addr | |
| unsigned long | len | |
| unsigned long | pgoff | |
| bool * | need_rmap_locks |
| 3196 | bool faulted_in_anon_vma = true |
| 3202 | 如果此条件成立可能性小(为编译器优化)(vma_is_anonymous(vma) && !Serialized by page_table_lock )则 |
| 3203 | pgoff等于addr右移PAGE_SHIFT determines the page size 位 |
| 3204 | faulted_in_anon_vma = false |
| 3209 | new_vma等于Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor |
| 3212 | 如果new_vma则 |
| 3234 | 否则 |
| 3235 | new_vma等于vm_area_dup(vma) |
| 3241 | 如果vma_dup_policy(vma, new_vma)则转到:out_free_vma |
| 3243 | 如果anon_vma_clone(new_vma, vma)则转到:out_free_mempol |
| 3250 | * need_rmap_locks = false |
| 3252 | 返回:new_vma |
| 3254 | out_free_mempol : |
| 3255 | mpol_put(vma_policy(new_vma)) |
| 3256 | out_free_vma : |
| 3257 | vm_area_free(new_vma) |
| 3258 | out : |
| 3259 | 返回:NULL |
| 名称 | 描述 |
|---|---|
| move_vma |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |