| Function report | 
| Source Code: mm\mempolicy.c | Create Date:2022-07-28 15:31:23 | 
| Last Modify:2020-03-17 22:28:11 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Step 2: apply policy to a range and do splits.
Proto:static int mbind_range(struct mm_struct *mm, unsigned long start, unsigned long end, struct mempolicy *new_pol)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct mm_struct * | mm | |
| unsigned long | start | |
| unsigned long | end | |
| struct mempolicy * | new_pol | 
| 753 | err = 0 | 
| 762 | If start > Our start address within vm_mm. Then prev = vma | 
| 765 | When vma && Our start address within vm_mm. < end cycle | 
| 767 | vmstart = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(start, Our start address within vm_mm. ) | 
| 768 | vmend = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(end, The first byte after our end addresswithin vm_mm. ) | 
| 770 | If mpol_equal(vma_policy(vma), new_pol) Then Continue | 
| 773 | pgoff = Offset (within vm_file) in PAGE_SIZEunits + ( vmstart - Our start address within vm_mm. >> PAGE_SHIFT determines the page size ) | 
| 775 | prev = Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor | 
| 778 | If prev Then | 
| 781 | If mpol_equal(vma_policy(vma), new_pol) Then Continue | 
| 784 | Go to replace | 
| 786 | If Our start address within vm_mm. != vmstart Then | 
| 791 | If The first byte after our end addresswithin vm_mm. != vmend Then | 
| 796 | replace : | 
| 802 | out : | 
| 803 | Return err | 
| Name | Describe | 
|---|---|
| do_mbind | 
| 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 |