Return the correct value for sysconf(_SC_PAGESIZE)

Corinna Vinschen
Tue Nov 15 14:59:00 GMT 2016

On Nov 15 14:51, Erik Bray wrote:
> Greetings,
> Currently sysconf(_SC_PAGESIZE) returns the value of
> wincap.allocation_granularity()--a change I *think* had to have been
> made by mistake in
> There's no obvious reason, anyways, that this value should be returned
> and not the actual page size.

That's no accident, but a deliberate decision.  Originally we used the
page size at this point, but that's long ago.  This has been discussed
on the cygwin-developers mailing list years ago.  The problem is the
POSIX assumption that the allocation granularity equals the page size.
The only working solution which does not break assumptions is to return
the allocation granularity as page size.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Cygwin-patches mailing list