| Function report | 
| Source Code: mm\hugetlb.c | Create Date:2022-07-28 15:26:45 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:__vma_reservation_common
Proto:static long __vma_reservation_common(struct hstate *h, struct vm_area_struct *vma, unsigned long addr, enum vma_resv_mode mode)
Type:long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct hstate * | h | |
| struct vm_area_struct * | vma | |
| unsigned long | addr | |
| enum vma_resv_mode | mode | 
| 1874 | resv = vma_resv_map(vma) | 
| 1875 | If Not resv Then Return 1 | 
| 1878 | idx = Convert the address within this vma to the page offset within* the mapping, in pagecache page units; huge pages here. | 
| 1880 | Case mode == VMA_NEEDS_RESV | 
| 1882 | Break | 
| 1883 | Case mode == VMA_COMMIT_RESV | 
| 1885 | Break | 
| 1886 | Case mode == VMA_END_RESV | 
| 1888 | ret = 0 | 
| 1889 | Break | 
| 1890 | Case mode == VMA_ADD_RESV | 
| 1891 | If Flags, see mm.h. & VM_MAYSHARE Then ret = Add the huge page range represented by [f, t) to the reserve* map | 
| 1893 | Else | 
| 1897 | Break | 
| 1898 | Default | 
| 1899 | BUG() | 
| 1902 | If Flags, see mm.h. & VM_MAYSHARE Then Return ret | 
| 1918 | If ret Then Return 0 | 
| 1920 | Else Return 1 | 
| Name | Describe | 
|---|---|
| vma_needs_reservation | |
| vma_commit_reservation | |
| vma_end_reservation | |
| vma_add_reservation | 
| 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 |