"show me the code"
- Produto central do projeto é seu software.
- Código-fonte escrito e mantido pela equipe do projeto.
- Majoritariamente C; Perl, C++ e Python são também frequentemente
usados.
- Shell, yacc, awk e sed são usados como linguagens auxiliares.
- Normalmente mantido sob sistemas de controle de versão.
|
static void oom_kill(void)
{
struct task_struct *p, *q;
read_lock(&tasklist_lock);
p = select_bad_process();
/* Found nothing?!?! Either we
hang forever, or we panic. */
if (p == NULL)
panic("Out of memory and
no killable processes...\n");
/* kill all processes that share
the ->mm (i.e. all threads) */
for_each_task(q) {
if (q->mm == p->mm)
oom_kill_task(q);
}
read_unlock(&tasklist_lock);
/* Make kswapd go out of the way, so
* "p" has a good chance of killing
* itself before someone else gets the
* chance to ask for more memory. */
yield();
return;
}
|