This is the mail archive of the cygwin-patches 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] |
On 11/16/2016 07:56 AM, Erik Bray wrote: >> There is no good reason to use the non-POSIXy page size. It doesn't >> help you in the least for any pagesize-related functionality. Mmap >> as well as malloc and friends only work with _SC_PAGESIZE sized pages. >> >> It sounds as if you're looking for a solution for which there's no >> problem... > > > FWIW the background here is that I'm working on porting psutil [1] to > Cygwin, and trying to accomplish as much as *possible* through the > POSIX interfaces without having to fall back on the Windows API. It's > actually a great exercise in what is and isn't possible with Cygwin :) > > In this case I was trying to compute process memory usage from > /proc/<pid>/statm which gives values in page counts, so I need the > page size (the actual page size) to compute the values in bytes. If /proc/<pid>/statm is reporting memory in multiples that are not the POSIX _SC_PAGESIZE, that is a bug in the statm file emulation that should be fixed there. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |