1.7.0 CVS mmap failure

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Jan 11 09:46:00 GMT 2007


On Jan 10 22:44, Christopher Layne wrote:
> > On Jan 10 09:37, Brian Ford wrote:
> > > Yes, this fixes my STC and the application from which it was derived.
> > > Thanks.
> 
> BTW: a couple of things:
> 
> 1. Is there a possibility of another application or thread reserving that
> just alloc/free'd area right after using it to obtain (at that time) a
> valid address?

Yes, though unlikely.  Standard allocations are basically bottom-up,
mmap allocations are top-down.  As soon as malloc uses bigger chunks
(>128K), it uses mmap.  mmap is running in a critical section and
supposed to be thread-safe.

> 2. What exactly is the difference between using CreateFileMapping and
> MapViewOfFile vs what we're doing now which seems to use NtMapViewOfSection?

Win32 vs. native NT call.  The former doesn't support all flags and
memory protections the latter supports.


Corinna

-- 
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/



More information about the Cygwin mailing list