2008/11/25 Jakov af Wallby <[EMAIL PROTECTED]>:
>
> On Mon, Nov 24, 2008 at 08:38:18PM +0100, Koen Deforche wrote:
>>
>> The way I understand it, linux overcommits memory: malloc() will
>
> It depends. On uclinux, or with uclinuxish software stacks, it does
> not overcommit.
>

There are probably a few places where this 'overcommit' pops up. For
sure, it is a property of the virtual memory manager in the linux
kernel. You can configure it in the proc filesystem:
/proc/sys/vm/overcommit_memory
This is not a kernel VM mailing list, so there are better places to
discuss this. But setting this parameter to '1' will allow
overcommitting, and that may solve Goetz's problems. But would that be
a good thing to do in the end?

Secondly, I can also imagine that a C library 'overcommits' by
requesting a large chunk from the kernel when malloc() is called, in
order to optimize memory allocation/deallocation in user space. That
would also be a waste of memory on memory-constrained systems, but I
don't think that is the problem here. The huge stack size in linux, as
pointed out by Koen before, can also be classified in this category:
the memory is assigned to the process but it is not used.

And finally, the 'uclinuxish software stacks' you talk about probably
disable overcommits in boot scripts, because especially in embedded
systems you don't want the kernel to kill random processes because
previously promised memory turns out not to be available after all,
without the user application having any opportunity to detect and
react on the out-of-memory situation. After all, when overcommit is
allowed, a malloc() should not fail...

In this case, the good solution is to find out why the Wt process
consumes that amount of memory (it shouldn't) and fix the problem.

Best regards,
Wim.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to