allow read into untouched noreserve mappings

Corinna Vinschen
Mon Jul 17 20:47:00 GMT 2006

On Jul 17 12:25, Brian Ford wrote:
> On Fri, 14 Jul 2006, Corinna Vinschen wrote:
> > The idea is to have features working for most cases and then
> > to get it working gradually better.
> Well, in that spirit then, the attached patch allows read and varients to
> use untouched noreserve mappings as buffers.  If this is accepted, I'll
> consider doing something similar for recvmsg and recvfrom.  That should
> cover the majority of cases, I believe.
> 2006-07-17  Brian Ford  <>
> 	* winsup.h (mmap_commit_noreserve_pages): New prototype.
> 	* (fhandler_base::raw_read): New function.
> 	* (fhandler_base::raw_read): Call it for
> 	INVALID_PARAMETER errors, and retry on success to allow
> 	reads into untouched MAP_NORESERVE buffers.

Sorry but... ERROR_INVALID_PARAMETER?  When I debugged this I got
ERROR_NOACCESS.  What system was that running on?

I would rather see the mmap_commit_noreserve_pages functionality folded
into the existing mmap_is_attached_or_noreserve_page function (add
parameter, see if len == 0 or > 0, yada yada yada) so that there's
only one function which does the work, regardless from where it's called.

Other than that it looks like a good start.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-patches mailing list