lkml.org 
[lkml]   [2000]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Out of memory?
On Sun, 20 Aug 2000, Adam wrote:

>
> > Or perhaps a tunable or compile-time option to turn off overcommits?
>
> FYI, something aproximately like that already exists...
>
> sh-2.04$ cat /proc/sys/vm/overcommit_memory
> 0

Yep - at least, it LOOKS that way. In fact, it's a complete misnomer:
with that value set to 0, you get "normal" Linux behaviour. Otherwise,
processes receive demand-allocated memory: malloc() and friends will
ALWAYS "succeed", then the memory is really allocated once you write to
it.

There are a few "tricks" to ensure malloc() & co only ever return "real"
memory; the trouble is, this behaviour cripples Linux as a WWW server or
similar, as well as wasting a LOT of swap space for no apparent gain.

Resource limits are probably a better way to go to solve this sort of
problem. That, and the various process-killing add-ons mentioned last time
this topic cropped up.


James.

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

\
 
 \ /
  Last update: 2005-03-22 12:37    [W:1.116 / U:0.348 seconds]
©2003-2014 Jasper Spaans. hosted at Digital Ocean