From: Doug McNaught <doug@wireboard.com>
To: Rob Landley <landley@trommello.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Rik van Riel <riel@conectiva.com.br>,
linux-kernel@vger.kernel.org
Subject: Re: can we make anonymous memory non-EXECUTABLE?
Date: 09 Jan 2002 14:47:32 -0500 [thread overview]
Message-ID: <m3666b8fxn.fsf@varsoon.denali.to> (raw)
In-Reply-To: <Pine.LNX.4.33L.0201090049390.2985-100000@imladris.surriel.com> <3C3BB05D.1040501@zytor.com> <200201091919.g09JJtA26375@snark.thyrsus.com>
In-Reply-To: Rob Landley's message of "Wed, 9 Jan 2002 06:32:39 -0500"
Rob Landley <landley@trommello.org> writes:
> Glibc does mmap instead of brk because theoretically brk can leave wasted
> memory between fragments, although apparently nobody's ever seen more than
> 10% waste in a live program, and the speed penality of taking a soft page
> fault at access time to muck about with the page tables is a LOT bigger than
> 10%...
The other reason glibc uses mmap() is because your shared libraries
are (usually) mapped smack dab in the middle of your address space.
brk() assumes a contiguous heap, so when it hits your libraries, it
has to stop, even if there is a gig of VM above the libs. mmap() can
give you an arbitrary chunk of the address space, so glibc uses it for
'large' allocations.
-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863
next prev parent reply other threads:[~2002-01-09 19:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-08 0:25 can we make anonymous memory non-EXECUTABLE? David Mosberger
2002-01-08 6:02 ` David S. Miller
2002-01-08 19:12 ` David Mosberger
2002-01-08 19:32 ` Albert D. Cahalan
2002-01-09 2:44 ` H. Peter Anvin
2002-01-09 2:49 ` Rik van Riel
2002-01-09 2:52 ` H. Peter Anvin
2002-01-09 11:32 ` Rob Landley
2002-01-09 19:47 ` Doug McNaught [this message]
2002-01-09 3:11 ` Alan Cox
2002-01-09 9:40 ` Erik Andersen
2002-01-08 13:23 ` Alan Cox
2002-01-08 19:15 ` [Linux-ia64] " David Mosberger
2002-01-11 5:49 ` David Mosberger
2002-01-10 1:04 ` Paul Mackerras
2002-01-10 3:40 ` David Mosberger
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=m3666b8fxn.fsf@varsoon.denali.to \
--to=doug@wireboard.com \
--cc=hpa@zytor.com \
--cc=landley@trommello.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
/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.