sysconf(_SC_PAGESIZE) set to 64k

Ehren Jarosek
Thu Jun 15 14:09:00 GMT 2006

I don't know if this is something I am doing wrong or an issue.

When compiling under cygwin sysconf(_SC_PAGESIZE) returns 65536 (64k)
memory page size.  My understanding is that:

sysconf(_SC_PAGESIZE) * sysconf(_SC_PHYS_PAGES)

should yield the total physical memory size of the machine.  However,
when I do this it yields a very large number (actually overflows my
long).  However, if I multiply sysconf(_SC_PHYS_PAGES) * 4096 it yields
the correct size.

My code works properly under linux.  Attached is my cygcheck.out.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 21431 bytes
Desc: cygcheck.out
URL: <>
-------------- next part --------------
Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list