Messages in this thread |  | | Date | Sun, 20 Aug 2000 16:37:03 +0100 (BST) | From | James Sutherland <> | Subject | Re: 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/
|  |