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]

Re: [ATTN: procps maintainer] RealPageSize


On 04/05/2017 17:00, Marty Shannon wrote:
This fix for php (posted by ricardohenrylee@gmail.com) should be
applied to the code for "top"; it (and /usr/bin/time -v) think the
page size is actually 64k, and reports RESident size as 16 times what
it should be.

 # if HAVE_UNISTD_H
 #  include <unistd.h>
 #  if defined(_SC_PAGESIZE)
+#   ifdef __CYGWIN__
+#    define REAL_PAGE_SIZE 4096
+#   else
 #    define REAL_PAGE_SIZE sysconf(_SC_PAGESIZE);
+#   endif
 #  elif defined(_SC_PAGE_SIZE)
 #    define REAL_PAGE_SIZE sysconf(_SC_PAGE_SIZE);
 #  endif

Cheers,
Marty


How is top measuring the memory of process ?

  /proc/<pid>/statm

should report the correct info in
sysconf(_SC_PAGESIZE) = 64K units.


https://cygwin.com/ml/cygwin-patches/2016-q4/msg00009.html

Regards
Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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