summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-05-15 11:56:51 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-05-15 11:56:51 +0000
commitf2669f5d16ddafa2e92c785aeae2fb3899238d27 (patch)
tree8c3730404056b5d18869a51297c803c0d520acd8
parenta445a0b0ce9bc97596d5d38931ecae5b0c0f0e6d (diff)
downloadcygnal-f2669f5d16ddafa2e92c785aeae2fb3899238d27.tar.gz
cygnal-f2669f5d16ddafa2e92c785aeae2fb3899238d27.tar.bz2
cygnal-f2669f5d16ddafa2e92c785aeae2fb3899238d27.zip
* fhandler_proc.cc (format_proc_meminfo): Make swap memory output
Linux style values.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_proc.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0ec79a447..7dedfe3c7 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
+ Linux style values.
+
2003-05-13 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index a6f759d2e..f9b866d83 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -397,8 +397,8 @@ format_proc_meminfo (char *destbuf, size_t maxsize)
GlobalMemoryStatus (&memory_status);
mem_total = memory_status.dwTotalPhys;
mem_free = memory_status.dwAvailPhys;
- swap_total = memory_status.dwTotalPageFile;
- swap_free = memory_status.dwAvailPageFile;
+ swap_total = memory_status.dwTotalPageFile - mem_total;
+ swap_free = memory_status.dwAvailPageFile - mem_total;
return __small_sprintf (destbuf, " total: used: free:\n"
"Mem: %10lu %10lu %10lu\n"
"Swap: %10lu %10lu %10lu\n"