From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Nicholas Miell <nmiell@comcast.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: overcommit verses MAP_NORESERVE
Date: Sun, 07 Aug 2005 12:49:41 +0100 [thread overview]
Message-ID: <1123415381.9464.29.camel@localhost.localdomain> (raw)
In-Reply-To: <1123386755.26540.9.camel@localhost.localdomain>
On Sad, 2005-08-06 at 20:52 -0700, Nicholas Miell wrote:
> Why does overcommit in mode 2 (OVERCOMMIT_NEVER) explicitly force
> MAP_NORESERVE mappings to reserve memory?
>
> My understanding is that MAP_NORESERVE is a way for apps to state that
> they are aware that the memory allocated may not exist and that they
> might get a SIGSEGV and that's OK with them.
Because a MAP_NORESERVE space that is filled with pages might cause
insufficient memory to be left available for another object that is not
MAP_NORESERVE.
You are right it could be improved but that would require someone
writing code that forcibly reclaimed MAP_NORESERVE objects when we were
close to out of memory. At the moment nobody has done this, but nothing
is stopping someone having a go.
next prev parent reply other threads:[~2005-08-07 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-07 3:52 overcommit verses MAP_NORESERVE Nicholas Miell
2005-08-07 11:49 ` Alan Cox [this message]
2005-08-08 7:22 ` Nicholas Miell
2005-08-08 10:41 ` Alan Cox
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=1123415381.9464.29.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=nmiell@comcast.net \
/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