delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/05/11:34:48

X-Spam-Check-By: sourceware.org
Date: Fri, 5 Jan 2007 11:34:36 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.0 CVS mmap failure
Message-ID: <20070105163436.GA28426@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0701041715140 DOT 3520 AT PC1163-8460-XP DOT flightsafety DOT com> <20070105095752 DOT GB28768 AT calimero DOT vinschen DOT de> <20070105160215 DOT GA5674 AT ns1 DOT anodized DOT com> <20070105160650 DOT GJ3521 AT implementation DOT labri DOT fr> <20070105161751 DOT GB5674 AT ns1 DOT anodized DOT com>
Mime-Version: 1.0
In-Reply-To: <20070105161751.GB5674@ns1.anodized.com>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Fri, Jan 05, 2007 at 08:17:51AM -0800, Christopher Layne wrote:
>mmap() is supposed to zero-fill, not refuse to map when len
>is less than the system page size. I have never ever seen
>mmap() fail to map less than page size on any typical Posix
>system.
>
>"
>       The  system shall always zero-fill any partial page at the end
>       of an object. Further, the system shall never write out any
>       modified portions of the last page of  an  object  which are
>       beyond its end.    References within the address range starting
>       at pa and continuing for len bytes to whole pages following the
>       end of an object shall result in delivery of a SIGBUS signal.
>"
>
>Back to the original issue, consider this:
>
>MEM_TOP_DOWN
>0x100000	Allocates memory at the highest possible address.
>
>If there were any kind of simple arithmetic bug behind mmap()'s
>scenes (such as computing space to zero-fill, etc. etc.) I would
>think ENOMEM would be a very common scenario if we're allocating
>near the end of addressible space.

  % grep "simple arithmetic bug" mmap.cc
  %

Seems fine to me.

It's probably a hyperthreaded, dual-core problem.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019