patch-2.4.0-test11 linux/mm/oom_kill.c
Next file: linux/mm/swap_state.c
Previous file: linux/mm/mremap.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Tue Nov 14 10:56:46 2000
- Orig file:
v2.4.0-test10/linux/mm/oom_kill.c
- Orig date:
Tue Oct 31 12:42:27 2000
diff -u --recursive --new-file v2.4.0-test10/linux/mm/oom_kill.c linux/mm/oom_kill.c
@@ -117,18 +117,18 @@
*/
static struct task_struct * select_bad_process(void)
{
- int points = 0, maxpoints = 0;
+ int maxpoints = 0;
struct task_struct *p = NULL;
struct task_struct *chosen = NULL;
read_lock(&tasklist_lock);
- for_each_task(p)
- {
- if (p->pid)
- points = badness(p);
- if (points > maxpoints) {
- chosen = p;
- maxpoints = points;
+ for_each_task(p) {
+ if (p->pid) {
+ int points = badness(p);
+ if (points > maxpoints) {
+ chosen = p;
+ maxpoints = points;
+ }
}
}
read_unlock(&tasklist_lock);
@@ -156,7 +156,7 @@
if (p == NULL)
panic("Out of memory and no killable processes...\n");
- printk(KERN_ERR "Out of Memory: Killed process %d (%s).", p->pid, p->comm);
+ printk(KERN_ERR "Out of Memory: Killed process %d (%s).\n", p->pid, p->comm);
/*
* We give our sacrificial lamb high priority and access to
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)