summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-08-17 19:16:42 +0200
committerCorinna Vinschen <corinna@vinschen.de>2018-08-17 19:16:42 +0200
commitca2ec0c5cc73242a2a1d3863293c1fe647d6cc81 (patch)
tree5cbbe03a033e9bfcb5b99eb9ee2b30c510ceb7e5
parent76d17e68607800584ea9b194bfa5a1d9cfc3b1d6 (diff)
downloadcygnal-ca2ec0c5cc73242a2a1d3863293c1fe647d6cc81.tar.gz
cygnal-ca2ec0c5cc73242a2a1d3863293c1fe647d6cc81.tar.bz2
cygnal-ca2ec0c5cc73242a2a1d3863293c1fe647d6cc81.zip
Revert "Use allocation granularity as the 'page_size' in /proc/<pid>/status as well, for consistency with /proc/<pid>/statm"
This reverts commit 8a32c24a7bdb0f3d80daa8f267cc63d15edcf771. Replacing page_size() with allocation_granularity() was incorrect. The values returned by get_mem_values() are # of pages of size page_size(). Multiplying with allocation_granularity() here results in values 16 times too big.
-rw-r--r--winsup/cygwin/fhandler_process.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 8df55ece9..cbadea164 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -1216,7 +1216,7 @@ format_process_status (void *data, char *&destbuf)
if (!get_mem_values (p->dwProcessId, &vmsize, &vmrss, &vmtext, &vmdata,
&vmlib, &vmshare))
return 0;
- unsigned page_size = wincap.allocation_granularity ();
+ unsigned page_size = wincap.page_size ();
vmsize *= page_size; vmrss *= page_size; vmdata *= page_size;
vmtext *= page_size; vmlib *= page_size;
/* The real uid value for *this* process is stored at cygheap->user.real_uid