Function report |
Source Code:mm\mmap.c |
Create Date:2022-07-28 14:49:19 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Verify that the stack growth is acceptable and* update accounting. This is shared with both the
Proto:static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, unsigned long grow)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct vm_area_struct * | vma | |
| unsigned long | size | |
| unsigned long | grow | up and grow-down cases. |
| 2278 | If Not Return true if the calling process may expand its vm space by the passed* number of pages Then Return -ENOMEM |
| 2282 | If size > rlimit(RLIMIT_STACK) Then Return -ENOMEM |
| 2286 | If Flags, see mm.h. & VM_LOCKED Then |
| 2290 | limit = rlimit(RLIMIT_MEMLOCK) |
| 2291 | limit >>= PAGE_SHIFT determines the page size |
| 2292 | If locked > limit && Not Check operation authority Then Return -ENOMEM |
| 2297 | new_start = If Flags, see mm.h. & VM_GROWSUP Then Our start address within vm_mm. Else The first byte after our end addresswithin vm_mm. - size |
| 2299 | If is_hugepage_only_range(The address space we belong to. , new_start, size) Then Return -EFAULT |
| 2306 | If security_vm_enough_memory_mm(mm, up and grow-down cases.) Then Return -ENOMEM |
| 2309 | Return 0 |
| Name | Describe |
|---|---|
| expand_downwards | vma is the first one with address < vma->vm_start. Have to extend 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 |