函数逻辑报告 |
Source Code:mm\oom_kill.c |
Create Date:2022-07-27 15:29:50 |
Last Modify:2022-05-23 13:16:41 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:_of_memory - kill the "best" process when we run out of memory*@oc: pointer to struct oom_control* If we run out of memory, we have the choice between either* killing a random task (bad), letting the system crash (worse)
函数原型:bool out_of_memory(struct oom_control *oc)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct oom_control * | oc |
1045 | freed等于0 |
1047 | 如果oom_killer_disabled则返回:false |
1050 | 如果非is_memcg_oom(oc)则 |
1051 | blocking_notifier_call_chain( & oom_notify_list, 0, & freed) |
1052 | 如果freed大于0则返回:true |
1064 | wake_oom_reaper(当前进程) |
1065 | 返回:true |
1075 | 如果Used to determine cpuset and node locality requirement 且非Used to determine cpuset and node locality requirement 按位与__GFP_FS的值且非is_memcg_oom(oc)则返回:true |
1083 | 如果Used to print the constraint info. 不等于CONSTRAINT_MEMORY_POLICY则Used to determine mempolicy = NULL |
1091 | get_task_struct(当前进程) |
1093 | oom_kill_process(oc, "Out of memory (oom_kill_allocating_task)") |
1094 | 返回:true |
1099 | 如果非chosen则 |
1100 | dump_header(oc, NULL) |
1101 | 打印警告信息("Out of memory and no killable processes...\n") |
1110 | 如果(chosen && chosen != (void * ) - 1UL)则oom_kill_process(oc, !is_memcg_oom(oc) ? "Out of memory" : "Memory cgroup out of memory") |
1113 | 返回:非非chosen |
名称 | 描述 |
---|---|
pagefault_out_of_memory | The pagefault handler calls here because it is out of memory, so kill a* memory-hogging task. If oom_lock is held by somebody else, a parallel oom* killing is already in progress so do nothing. |
__alloc_pages_may_oom | |
mem_cgroup_out_of_memory |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |