From: "Ihar 'Philips' Filipau" <filia@softhome.net>
To: Rik van Riel <riel@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.2/2.4/2.6 VMs: do malloc() ever return NULL?
Date: Tue, 25 Nov 2003 20:03:51 +0100 [thread overview]
Message-ID: <3FC3A797.4060108@softhome.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0311251158110.2870-100000@chimarrao.boston.redhat.com>
Rik van Riel wrote:
> On Tue, 25 Nov 2003, Ihar 'Philips' Filipau wrote:
>
>> 2.6: the same as 2.4 with oom killer (default conf). I have no test
>> system to check 2.6. w/o oom killer.
>
>
> # echo 2 > /proc/sys/vm/overcommit_memory
>
> Then try again.
>
What do you know what is not said in docs?
What '2' means?
I'll try as soon as I will have again access to 2.6 box.
this is what 2.6-test10 says:
> overcommit_memory
>
> This file contains one value. The following algorithm is used to
> decide if there's enough memory: if the value of
> overcommit_memory is positive, then there's always enough memory.
> This is a useful feature, since programs often malloc() huge amounts
> of memory 'just in case', while they only use a small part of it.
> Leaving this value at 0 will lead to the failure of such a huge
> malloc(), when in fact the system has enough memory for the program
> to run.
>
> On the other hand, enabling this feature can cause you to run out
> of memory and thrash the system to death, so large and/or important
> servers will want to set this value to 0.
Could this special case 'sysctl_overcommit_memory > 1' be added and
explained? (mmap.c:589)
I cannot tell what it does - but name 'security_vm_enough_memory()'
sounds promising ;-)
As I have said - I will check this later when I will get to those box.
--
Ihar 'Philips' Filipau / with best regards from Saarbruecken.
-- _ _ _
Because the kernel depends on it existing. "init" |_|*|_|
literally _is_ special from a kernel standpoint, |_|_|*|
because its' the "reaper of zombies" (and, may I add, |*|*|*|
that would be a great name for a rock band).
-- Linus Torvalds
next prev parent reply other threads:[~2003-11-25 19:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-25 13:27 2.2/2.4/2.6 VMs: do malloc() ever return NULL? Ihar 'Philips' Filipau
2003-11-25 14:00 ` Arjan van de Ven
2003-11-25 16:58 ` Rik van Riel
2003-11-25 19:03 ` Ihar 'Philips' Filipau [this message]
2003-11-25 19:24 ` Rik van Riel
2003-11-25 19:28 ` Chris Wright
2003-11-25 20:17 ` Richard B. Johnson
2003-11-25 23:17 ` Ihar 'Philips' Filipau
2003-11-25 23:40 ` Oliver
2003-11-26 13:06 ` Richard B. Johnson
2003-11-26 13:20 ` Ihar 'Philips' Filipau
2003-11-26 13:27 ` William Lee Irwin III
2003-11-26 14:33 ` Ihar 'Philips' Filipau
2003-11-26 14:36 ` William Lee Irwin III
2003-11-26 13:49 ` Richard B. Johnson
2003-11-26 14:39 ` Ihar 'Philips' Filipau
2003-11-26 7:31 ` Tim Connors
2003-11-26 9:58 ` William Lee Irwin III
[not found] <VLAm.2g1.9@gated-at.bofh.it>
[not found] ` <VM3n.3jY.9@gated-at.bofh.it>
2003-11-25 15:23 ` Ihar 'Philips' Filipau
[not found] <VQJL.62Q.11@gated-at.bofh.it>
[not found] ` <VR3c.6Ns.21@gated-at.bofh.it>
2003-11-26 10:30 ` Ihar 'Philips' Filipau
2003-11-26 10:39 ` William Lee Irwin III
2003-11-26 12:14 ` Ihar 'Philips' Filipau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FC3A797.4060108@softhome.net \
--to=filia@softhome.net \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox