This is the mail archive of the cygwin 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]
Other format: [Raw text]

sysconf(_SC_PAGESIZE) set to 64k


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.


Thanks,
Ehren

Attachment: cygcheck.out
Description: cygcheck.out

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

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