Function report |
Source Code:mm\mmap.c |
Create Date:2022-07-28 14:50:19 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Copy the vma structure to a new location in the same mm,* prior to moving page table entries, to effect an mremap move.
Proto:struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, unsigned long addr, unsigned long len, unsigned long pgoff, bool *need_rmap_locks)
Type:struct vm_area_struct
Parameter:
| Type | Parameter | Name |
|---|---|---|
| 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 |
| 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 | If new_vma Then |
| 3234 | Else |
| 3235 | new_vma = vm_area_dup(vma) |
| 3241 | If vma_dup_policy(vma, new_vma) Then Go to out_free_vma |
| 3243 | If anon_vma_clone(new_vma, vma) Then Go to out_free_mempol |
| 3245 | If File we map to (can be NULL). Then get_file(File we map to (can be NULL). ) |
| 3247 | If Function pointers to deal with this struct. && open Then open(new_vma) |
| 3250 | * need_rmap_locks = false |
| 3252 | Return 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 | Return NULL |
| Name | Describe |
|---|---|
| move_vma |
| 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 |