X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 31 Mar 2009 13:21:11 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: IPC,FORK on Windows 2008 Server Message-ID: <20090331112111.GB12738@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Mar 31 15:04, Yarlagadda Suresh wrote: > Hi, > > I am using CYGWIN V 1.5.25-15 on Windows 2008 Standard Server Edition with SP1. > > I have a program which does the following : > > 1. The main process gets shared memory, opens an index file (through > Btrieve API). How does it get shared memory? Does it use mmap() or does it use shmget()/shmat()? I assume the latter, since you're talking about IPC. > 2. If a record is found in the index file,the main process forks a child > and the child process reads the index file and process the data. > > The program fails on the above system configuration giving the following error: > > *** fatal error - MapViewOfFileEx (0x3D0000), Win32 error 487. > Terminating. This is probably not quite the same problem the thread from 2005 refers to, even though the result looks pretty much identical. I remember that I changed the mmap() implementation to allocate shared memory from the OS using the MEM_TOP_DOWN flag when Vista came out. The reason was that on Vista there was a very high probability that the memory region requested without that flag would collide with a DLL loaded into memory at this address. I did not change the way the memory region is allocated for shmget(), though. Heading straight to a Cygwin 1.7 release, we won't change Cygwin 1.5.25 anymore, though. You have three choices: - Check if mmap() doesn't already do what you need, rather than using shmget()/shmat(). It would also allow to run your application without having to run cygserver. - Install a Cygwin 1.7 test release[1] and see if it fixes your problem already. If not, I have an idea what to change. Corinna [1] http://cygwin.com/ml/cygwin-announce/2009-03/msg00087.html -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/