From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 6 14:17:18 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 031B516A4CE for ; Fri, 6 Feb 2004 14:17:18 -0800 (PST) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E0D043D45 for ; Fri, 6 Feb 2004 14:17:16 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from robbins.dropbear.id.au (210.50.112.210) by smtp01.syd.iprimus.net.au (7.0.024) id 400C4DF40075692B; Sat, 7 Feb 2004 09:18:42 +1100 Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id 34A2441AD; Sat, 7 Feb 2004 09:17:03 +1100 (EST) Date: Sat, 7 Feb 2004 09:17:03 +1100 From: Tim Robbins To: Luigi Rizzo Message-ID: <20040206221703.GB54490@cat.robbins.dropbear.id.au> References: <20040206120323.A68951@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040206120323.A68951@xorpc.icir.org> User-Agent: Mutt/1.4.1i cc: hackers@freebsd.org Subject: Re: munmap.2 inconsistency ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 22:17:18 -0000 On Fri, Feb 06, 2004 at 12:03:23PM -0800, Luigi Rizzo wrote: > hi, > browsing through the munmap() page, it says > Munmap() will fail if: > > [EINVAL] The addr parameter was not page aligned, the len > ... > > now, i have verified that munmap works fine with any address returned > by mmap, even if not aligned, at least on a recent -STABLE. > > As i assume that passing munmap() the same address returned by mmap() > is common behaviour, should we rephrase the manpage ? This could have slipped in from POSIX, which requires page-aligned addresses and lengths to mmap() & friends. I believe SVR4 also requires this. But yes, the manual pages should be corrected. Tim