www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
Date: | Thu, 19 Sep 2002 09:32:39 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | "Cygwin AT Cygwin. Com" <cygwin AT cygwin DOT com> |
Subject: | Re: MMap offset parameter failing with ENOMEM error |
Message-ID: | <20020919093239.H29920@cygbert.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | "Cygwin AT Cygwin. Com" <cygwin AT cygwin DOT com> |
References: | <000b01c25f82$ee240380$8e90a8c0 AT citr DOT com DOT au> |
Mime-Version: | 1.0 |
In-Reply-To: | <000b01c25f82$ee240380$8e90a8c0@citr.com.au> |
User-Agent: | Mutt/1.3.22.1i |
On Thu, Sep 19, 2002 at 12:19:06PM +1000, Shane Mann wrote: > Hi, > > I am having trouble with mmap using the last 'offset' parameter. I have > attached a small piece of code (and sample file) which demonstrates the > problem. Basically if the offset parameter is passed as a variable to mmap > then the call fails with an ENOMEM error. But if you pass 0 as the parameter > and then access the return address from mmap + offset - it is fine. My > question: is mmap handling the offset parameter correctly? > > Usage for the program: > > ./a.exe <offset> <file> eg: ./a.exe 11200 index.idx > > To see the address + offset work, comment out the first mmap call and return > statement and uncomment the lines below each one. > > Any help appreciated. Your application tries to mmap over EOF. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |