Why kernel kills processes that run out of memory instead of just failing memory allocation system calls?

Nate Eldredge neldredge at math.ucsd.edu
Thu May 21 16:00:38 UTC 2009


On Thu, 21 May 2009, perryh at pluto.rain.com wrote:

> Nate Eldredge <neldredge at math.ucsd.edu> wrote:
>> With overcommit, we pretend to give the child a writable private
>> copy of the buffer, in hopes that it won't actually use more of it
>> than we can fulfill with physical memory.
>
> I am about 99% sure that the issue involves virtual memory, not
> physical, at least in the fork/exec case.  The incidence of such
> events under any particular system load scenario can be reduced or
> eliminated simply by adding swap space.

True.  When I said "a system with 1GB of memory", I should have said "a 
system with 1 GB of physical memory + swap".

-- 

Nate Eldredge
neldredge at math.ucsd.edu


More information about the freebsd-hackers mailing list