My computer recently ran out of memory (a not-unexpected consequence of compiling software while working with large GIS datasets). In the system log detailing how it dealt with the OOM condition is the following line:

Out of memory: Kill process 7429 (java) score 259 or sacrifice child

What is that or sacrifice child about? Surely it isn't pondering some dark ritual to keep things going?

3 Answers 3


From source files I found oom_kill.c, the OOM Killer, after such message is written in system log, checks children of the process identified and evaluates if possible to kill one of them in place of the process itself.

Here a comment extracted from source file explaining this:

 * If any of p's children has a different mm and is eligible for kill,
 * the one with the highest oom_badness() score is sacrificed for its
 * parent.  This attempts to lose the minimal amount of work done while
 * still freeing memory.
  • It also does that for Firefox (Web Content).
    – neverMind9
    Feb 1, 2019 at 0:19

It's talking about killing a child process of the process nominated to be sent a KILL signal.

  • 2
    But what does it mean? Is there some method by which the parent can "sacrifice" a child to save itself?
    – Thanatos
    Dec 11, 2017 at 19:46
  • My guess, which is just a guess, is that since all process are descendants of the Linux init process that the parent in this context is a Linux process where the children are the various applications. In this case, the Linux process is saving itself by killing one of its children.
    – Seamus
    Mar 16, 2018 at 16:53

This is Oom(Out of memory) killer. When your system runs out of memory, the linux kernel kills processes to free memory. An heuristic determines which process is the best candidate to get memory freed without damaging the system (typically, root owned processes are not best candidates).

More details here : How OOM killer decides which process to kill first?

  • 4
    This doesn't explain the "or sacrifice child" part of the message, though.
    – Mark
    May 10, 2016 at 20:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .