Skip to content

Instantly share code, notes, and snippets.

@EJSohn
Created April 28, 2019 11:07
Show Gist options
  • Save EJSohn/893d019f90b9238d444ea03cf65e8a46 to your computer and use it in GitHub Desktop.
Save EJSohn/893d019f90b9238d444ea03cf65e8a46 to your computer and use it in GitHub Desktop.
/*
* Processes which fork a lot of child processes are likely
* a good choice. We add the vmsize of the childs if they
* have an own mm. This prevents forking servers to flood the
* machine with an endless amount of childs
*/
...
if (chld->mm != p->mm && chld->mm)
points += chld->mm->total_vm;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment