This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IPC,FORK on Windows 2008 Server


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]