Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 52246 invoked from network); 29 Jan 2008 22:59:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jan 2008 22:59:56 -0000 Received: (qmail 12265 invoked by uid 500); 29 Jan 2008 22:59:47 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 12199 invoked by uid 500); 29 Jan 2008 22:59:46 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 12190 invoked by uid 99); 29 Jan 2008 22:59:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2008 14:59:46 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2008 22:59:19 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JJzQL-0007Ma-O2 for dev@stdcxx.apache.org; Tue, 29 Jan 2008 14:59:25 -0800 Message-ID: <15171629.post@talk.nabble.com> Date: Tue, 29 Jan 2008 14:59:25 -0800 (PST) From: Travis Vitek To: dev@stdcxx.apache.org Subject: Re: [PATCH] STDCXX-705 In-Reply-To: <479FA2D8.6060209@roguewave.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: vitek@roguewave.com References: <479FA2D8.6060209@roguewave.com> X-Virus-Checked: Checked by ClamAV on apache.org Martin Sebor wrote: > > Travis Vitek wrote: >> >>> >>> It looks like th original code was stepping 16MB (1024 * 1024 bytes) >>> past bad_address. That should be well more than one page away. BTW, you >>> can determine the kernel page size on most *nix platforms with sysconf >>> (_SC_PAGESIZE). >>> >>> Travis >>> >> >> Of course the kernel memory page size from sysconf() isn't the same as >> the virtual memory page size that you are talking about. :) > > It's not? I thought both sysconf(_SC_PAGESIZE) and getpagesize() > returned the size of the virtual page. I.e., whatever smallest > unit mmap() allocates. > > Martin > I think I may have worded my response poorly. The page size, as returned by sysconf(), is does not appear to be the same as the page size that is set by chatr. $ cat u.cpp && aCC u.cpp #include #include int main () { printf ("%ld\n", sysconf (_SC_PAGE_SIZE)); return 0; } $ chatr +pd 1M +pi 1M a.out > /dev/null && ./a.out 4096 $ chatr +pd 4M +pi 4M a.out > /dev/null && ./a.out 4096 A quick glance at the documentation for chatr says that +pd and +pi are only hints for the virtual memory page size, so that may explain the difference I'm seeing. Interestingly, you can set values for up to 4GB. Travis -- View this message in context: http://www.nabble.com/-PATCH--STDCXX-705-tp15168662p15171629.html Sent from the stdcxx-dev mailing list archive at Nabble.com.