From owner-freebsd-arch Wed Feb 14 18:10:50 2001 Delivered-To: freebsd-arch@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 8D35437B401 for ; Wed, 14 Feb 2001 18:10:46 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id NAA29149; Thu, 15 Feb 2001 13:10:42 +1100 (EDT) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37641) with ESMTP id <01K052A0OWSWI8TCQV@cim.alcatel.com.au>; Thu, 15 Feb 2001 13:10:28 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.1/8.11.1) id f1F2AaV71832; Thu, 15 Feb 2001 13:10:36 +1100 (EST envelope-from jeremyp) Content-return: prohibited Date: Thu, 15 Feb 2001 13:10:36 +1100 From: Peter Jeremy Subject: Re: sparse core dumps In-reply-to: <200102150018.RAA09453@usr08.primenet.com>; from tlambert@primenet.com on Thu, Feb 15, 2001 at 12:18:53AM +0000 To: Terry Lambert Cc: arch@FreeBSD.ORG Mail-followup-to: Terry Lambert , arch@FreeBSD.ORG Message-id: <20010215131036.W90937@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <200102150018.RAA09453@usr08.primenet.com> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2001-Feb-15 00:18:53 +0000, Terry Lambert wrote: >> > One reason is that it is a bug for PAGE_SIZE to be visible to applications. >> >> Fair enough. > >That's like saying that it's a bug for alignment boundaries to be >visible to the application (which they are, on architectures where >unaligned accesses result in faults, either because of the fault >causing a failure, or because of the fault being detectable through >profiling aligned vs. unaligned access, and therefore detecting the >fixup). I think the intention was that a userland reference to the macro PAGE_SIZE (hard-coded to 4096, 8192 or some other value) is a bug. Applications should be using getpagesize(3) instead. (And of course, neither approach covers the situation where different parts of the address space effectively have different page sizes). Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message