Re: Some questions about linux kernel.

From: James Sutherland (jas88@cam.ac.uk)
Date: Mon Mar 20 2000 - 07:26:26 EST


On 20 Mar 2000 1:16:11 +0100, you wrote:

>Den 16-Mar-00 13:15:39 skrev James Sutherland følgende om "Re: Some questions about linux kernel.":
>
>> No - quite the opposite. I had 0 in /proc/sys/vm/overcommit_memory. All
>> that happened was the compiler processes grabbed all the VM I had,
>> malloc() started returning zero, things started dying when they couldn't
>> get the memory they needed.
>
> Gcc checks its memory allocations and exits if they fail. That clearly
>didn't happen. The reason of course is that putting 0 into
>/proc/sys/vm/overcommit_memory is darn close to a no-op. What you saw was
>the effect of overcommitting memory. The "No memory for process xxx"
>messages on the console could have told you that.

No, gcc was allocating memory and dying quite normally. The problem
being, other processes were also trying to allocate memory and dying
as a result.

There were no visible console messages, since I don't HAVE a seperate
console - I was in X at the time, which also died when unable to
allocate memory.

Changing from demand-allocated memory (overcommit) to
request-allocated memory could have helped a bit, I suppose, if all my
processes had already allocated all the memory they needed but not
used it yet. (OTOH, I would consider doing that to be a bug in the
app...)

James.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:29 EST