Function report | 
Source Code:mm\oom_kill.c | 
Create Date:2022-07-28 14:05:51 | 
| Last Modify:2022-05-23 13:16:41 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:m_badness - heuristic function to determine which candidate task to kill*@p: task struct of which task we should calculate*@totalpages: total present RAM allowed for page allocation* The heuristic for determining which task to kill is made to be as simple
Proto:unsigned long oom_badness(struct task_struct *p, unsigned long totalpages)
Type:unsigned long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct task_struct * | p | |
| unsigned long | totalpages | 
| 203 | If rn true if the task is not adequate as candidate victim task. Then Return 0 | 
| 207 | If Not p Then Return 0 | 
| 215 | adj = oom_score_adj | 
| 219 | task_unlock(p) | 
| 220 | Return 0 | 
| 227 | points = get_mm_rss(mm) + per-process(per-mm_struct) statistics. + mm_pgtables_bytes(mm) / PAGE_SIZE | 
| 229 | task_unlock(p) | 
| 232 | adj *= totalpages / 1000 | 
| Name | Describe | 
|---|---|
| oom_evaluate_task | 
| 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  |