Function report |
Source Code:mm\mmap.c |
Create Date:2022-07-28 14:49:44 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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 <jeremy@goop.org>
Proto:int __do_munmap(struct mm_struct *mm, unsigned long start, size_t len, struct list_head *uf, bool downgrade)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct mm_struct * | mm | |
| unsigned long | start | |
| size_t | len | |
| struct list_head * | uf | |
| bool | downgrade |
| 2731 | arch_unmap(mm, start, end) |
| 2735 | If Not vma Then Return 0 |
| 2741 | If Our start address within vm_mm. >= end Then Return 0 |
| 2751 | If start > Our start address within vm_mm. Then |
| 2759 | If end < The first byte after our end addresswithin vm_mm. && number of VMAs >= sysctl_max_map_count Then Return -ENOMEM |
| 2770 | If last && end > Our start address within vm_mm. Then |
| 2775 | vma = If prev Then linked list of VM areas per task, sorted by address Else list of VMAs |
| 2777 | If Value for the false possibility is greater at compile time(uf) Then |
| 2795 | If Pages that have PG_mlocked set Then |
| 2797 | When tmp && Our start address within vm_mm. < end cycle |
| 2798 | If Flags, see mm.h. & VM_LOCKED Then |
| 2799 | Pages that have PG_mlocked set -= vma_pages(tmp) |
| 2800 | munlock_vma_pages_all(tmp) |
| 2810 | If downgrade Then downgrade write lock to read lock |
| 2818 | Return If downgrade Then 1 Else 0 |
| Name | Describe |
|---|---|
| SYSCALL_DEFINE1 | |
| do_munmap | |
| __vm_munmap | |
| SYSCALL_DEFINE5 | Expand (or shrink) an existing mapping, potentially moving it at the* same time (controlled by the MREMAP_MAYMOVE flag and available VM space)* MREMAP_FIXED option added 5-Dec-1999 by Benjamin LaHaise* This option implies MREMAP_MAYMOVE. |
| 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 |