From: "Ihar 'Philips' Filipau" <filia@softhome.net>
To: arjanv@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 16:23:10 +0100 [thread overview]
Message-ID: <3FC373DE.9090507@softhome.net> (raw)
In-Reply-To: <VM3n.3jY.9@gated-at.bofh.it>
Arjan van de Ven wrote:
>
> that is due to the overcommit policy that your admin has set.
> You can set it to disabled and then malloc will return NULL in userspace
>
Target (patched by mvista) system works as expected in case of
memory being touch.
But in case of "for(;;) malloc(N)" it still gets 1.8GB memory
allocated. (this is ppc32 - looks like 2/2 memory split) So it doesn't
look like working at all. So basicly pool allocation used in carrier
grade systems goes south: even with overcommit_memory=-1 && malloc()!=0
you can not be sure that memory is really allocated. Not good.
Vanilla 2.4.22 (this is x86) (with HZ=1024, if it does matter).
after '# echo -1 >/proc/sys/vm/overcommit_memory'
1. test app with memory touch still gets killed by oom_killer. (so
no malloc() == NULL)
2. test app w/o memory touch still can happily allocate 2.8GB of
memory (x86 - looks like 3/1 memory split) and only then gets NULL
pointer - oom_killer is silent.
But thanks for pointers in any way...
--
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 parent reply other threads:[~2003-11-25 15:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
[not found] <VQJL.62Q.11@gated-at.bofh.it>
[not found] ` <VR3c.6Ns.21@gated-at.bofh.it>
2003-11-26 10:30 ` 2.2/2.4/2.6 VMs: do malloc() ever return NULL? Ihar 'Philips' Filipau
2003-11-26 10:39 ` William Lee Irwin III
2003-11-26 12:14 ` Ihar 'Philips' Filipau
2003-11-25 13:27 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
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
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=3FC373DE.9090507@softhome.net \
--to=filia@softhome.net \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.