函数逻辑报告 | 
Source Code:mm\mmap.c | 
Create Date:2022-07-27 16:18:21 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:his is really a simplified "do_mmap". it only handles* anonymous maps. eventually we may be able to do some* brk-specific accounting here.
函数原型:static int do_brk_flags(unsigned long addr, unsigned long len, unsigned long flags, struct list_head *uf)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| unsigned long | addr | |
| unsigned long | len | |
| unsigned long | flags | |
| struct list_head * | uf | 
| 2975 | pgoff等于addr右移PAGE_SHIFT determines the page size 位 | 
| 2982 | flags或等于VM_DATA_DEFAULT_FLAGS按位或Is a VM accounted object 按位或def_flags | 
| 2984 | mapped_addr等于get_unmapped_area(NULL, addr, len, 0, Interpret addr exactly ) | 
| 2985 | 如果IS_ERR_VALUE(mapped_addr)则返回:mapped_addr | 
| 2988 | error等于mlock_future_check(mm, def_flags, len) | 
| 3002 | 如果非Return true if the calling process may expand its vm space by the passed* number of pages则返回:负ENOMEM | 
| 3005 | 如果 number of VMAs 大于sysctl_max_map_count则返回:负ENOMEM | 
| 3008 | 如果security_vm_enough_memory_mm(mm, len >> PAGE_SHIFT determines the page size )则返回:负ENOMEM | 
| 3012 | vma等于Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor | 
| 3020 | vma等于vm_area_alloc(mm) | 
| 3021 | 如果非vma则 | 
| 3023 | 返回:负ENOMEM | 
| 3026 | vma_set_anonymous(vma) | 
| 3030 | Flags, see mm.h. 等于flags | 
| 3033 | out : | 
| 3034 | perf_event_mmap(vma) | 
| 3037 | 如果flags按位与VM_LOCKED则 Pages that have PG_mlocked set 加等于len右移PAGE_SHIFT determines the page size 位 | 
| 3039 | Flags, see mm.h. 或等于VM_SOFTDIRTY | 
| 3040 | 返回:0 | 
| 名称 | 描述 | 
|---|---|
| SYSCALL_DEFINE1 | |
| vm_brk_flags | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |