Function report |
Source Code:mm\mmap.c |
Create Date:2022-07-28 14:49:38 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__split_vma() bypasses sysctl_max_map_count checking. We use this where it* has already been checked or doesn't make sense to fail.
Proto:int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, int new_below)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct mm_struct * | mm | |
struct vm_area_struct * | vma | |
unsigned long | addr | |
int | new_below |
2640 | If Function pointers to deal with this struct. && split Then |
2646 | new = vm_area_dup(vma) |
2650 | If new_below Then The first byte after our end addresswithin vm_mm. = addr |
2652 | Else |
2657 | err = vma_dup_policy(vma, new) |
2658 | If err Then Go to out_free_vma |
2661 | err = anon_vma_clone(new, vma) |
2662 | If err Then Go to out_free_mpol |
2665 | If File we map to (can be NULL). Then get_file(File we map to (can be NULL). ) |
2668 | If Function pointers to deal with this struct. && open Then open(new) |
2674 | Else err = vma_adjust(vma, Our start address within vm_mm. , addr, Offset (within vm_file) in PAGE_SIZEunits , new) |
2678 | If Not err Then Return 0 |
2682 | If Function pointers to deal with this struct. && close Then close(new) |
2684 | If File we map to (can be NULL). Then fput(File we map to (can be NULL). ) |
2686 | unlink_anon_vmas(new) |
2687 | out_free_mpol : |
2688 | mpol_put(vma_policy(new)) |
2689 | out_free_vma : |
2690 | vm_area_free(new) |
2691 | Return err |
Name | Describe |
---|---|
split_vma | Split a vma into two pieces at address 'addr', a new vma is allocated* either for the first part or the tail. |
__do_munmap | Munmap is split into 2 main parts -- this part which finds* what needs doing, and the areas themselves, which do the* work. This now handles partial unmappings.* Jeremy Fitzhardinge |
madvise_behavior | We can potentially split a vm area into separate* areas, each area with its own behavior. |
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 |