This is the mail archive of the cygwin@sourceware.cygnus.com 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]

mmap problems


The following mmap call works on both Linux and Solaris, but fails on
cygwin-NT:

      caddr_t p = NULL;
      if ((p = mmap(0, 
                    8192,
                    PROT_READ | PROT_WRITE,
                    MAP_SHARED,
                    m_fd,
                    (bn * 8192))) == MAP_FAILED)
      {
         fprintf(stderr, "DBFile1::getBlock - mmap failed : %d\n", errno);
         exit(1); //@@ errno set -- handle errors
      }

In the cygwin-NT case, mmap works properly if the offset value (given by
bn*8192) is 0, but fails otherwise with EACCESS.

Has anyone encountered this problem before? Does anyone know what is
happening?

Any help would be appreciated,

- Alex Santoro (santoro@poset.stanford.edu)



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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