From: David Luyer <david_luyer@pacific.net.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Andrea Arcangeli <andrea@suse.de>, Chris Wedgwood <cw@f00f.org>,
"David S. Miller" <davem@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: /proc/<n>/maps growing...
Date: 07 Aug 2001 12:24:05 +1000 [thread overview]
Message-ID: <997151045.10551.11.camel@typhaon> (raw)
In-Reply-To: <Pine.LNX.4.33.0108061019280.8972-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.33.0108061019280.8972-100000@penguin.transmeta.com>
On 06 Aug 2001 10:20:15 -0700, Linus Torvalds wrote:
> 2.4.x _does_ merge. Look for yourself. It doesn't merge mprotects, no. And
> why should glibc do mprotect() for a malloc() call? Electric Fence, yes.
> glibc, no.
What glibc does (when it decided to allocate in this way) is:
mmap(NULL,2*sz,PROT_NONE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE,-1,0)
free up 1*sz of space which isn't sz-aligned (presumably to prevent
fragmentation of its pools, now I think about it)
allocate out bits of the block mprotecting them as PROT_READ|PROT_WRITE
as it goes
Typically it's releasing multiples of 4kb at a time just like it brk()s
multiples of 4kb at a time. glibc doesn't catch accesses right down to
the byte but does catch accesses which are 'way off'. But really, yes,
you're right - if it's not catching everything it shouldn't catch
anything, since it's not its job. Unless the MAP_NORESERVE with
PROT_NONE is saving the system from even thinking about the unused parts
of the large slab glibc has just grabbed, in which case there is some
reason glibc should do things the way it does.
--
David Luyer Phone: +61 3 9674 7525
Engineering Projects Manager P A C I F I C Fax: +61 3 9699 8693
Pacific Internet (Australia) I N T E R N E T Mobile: +61 4 1111 2983
http://www.pacific.net.au/ NASDAQ: PCNTF
next prev parent reply other threads:[~2001-08-07 2:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-06 6:41 /proc/<n>/maps growing David Luyer
2001-08-06 7:43 ` Chris Wedgwood
2001-08-06 8:59 ` Andrea Arcangeli
2001-08-06 9:20 ` David S. Miller
2001-08-06 9:46 ` Chris Wedgwood
2001-08-06 10:57 ` Andrea Arcangeli
2001-08-06 12:26 ` Chris Wedgwood
2001-08-06 12:36 ` Andrea Arcangeli
2001-08-06 12:45 ` Chris Wedgwood
2001-08-06 12:50 ` Andrea Arcangeli
2001-08-06 13:06 ` David S. Miller
2001-08-06 13:29 ` Andrea Arcangeli
2001-08-06 17:27 ` Linus Torvalds
2001-09-03 15:44 ` mmap-rb-7 [was Re: /proc/<n>/maps growing...] Andrea Arcangeli
2001-08-06 17:20 ` /proc/<n>/maps growing Linus Torvalds
2001-08-07 2:24 ` David Luyer [this message]
2001-08-06 17:46 ` Anton Altaparmakov
2001-08-06 16:12 ` Rik van Riel
2001-08-06 17:46 ` Linus Torvalds
2001-08-06 10:30 ` Jakub Jelinek
2001-08-06 10:49 ` Andrea Arcangeli
2001-08-06 11:01 ` Jakub Jelinek
2001-08-06 11:25 ` Andrea Arcangeli
2001-08-06 17:17 ` Linus Torvalds
2001-08-06 17:26 ` Alan Cox
2001-08-06 22:55 ` Chris Wedgwood
2001-08-06 11:16 ` Jakub Jelinek
2001-08-06 17:18 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2001-08-07 3:46 Rick Hohensee
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=997151045.10551.11.camel@typhaon \
--to=david_luyer@pacific.net.au \
--cc=andrea@suse.de \
--cc=cw@f00f.org \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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