* fhandler_proc.cc (format_proc_meminfo): Make swap memory output

Linux style values.
This commit is contained in:
Corinna Vinschen 2003-05-15 11:56:51 +00:00
parent a445a0b0ce
commit f2669f5d16
2 changed files with 7 additions and 2 deletions

View File

@ -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> 2003-05-13 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately. * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.

View File

@ -397,8 +397,8 @@ format_proc_meminfo (char *destbuf, size_t maxsize)
GlobalMemoryStatus (&memory_status); GlobalMemoryStatus (&memory_status);
mem_total = memory_status.dwTotalPhys; mem_total = memory_status.dwTotalPhys;
mem_free = memory_status.dwAvailPhys; mem_free = memory_status.dwAvailPhys;
swap_total = memory_status.dwTotalPageFile; swap_total = memory_status.dwTotalPageFile - mem_total;
swap_free = memory_status.dwAvailPageFile; swap_free = memory_status.dwAvailPageFile - mem_total;
return __small_sprintf (destbuf, " total: used: free:\n" return __small_sprintf (destbuf, " total: used: free:\n"
"Mem: %10lu %10lu %10lu\n" "Mem: %10lu %10lu %10lu\n"
"Swap: %10lu %10lu %10lu\n" "Swap: %10lu %10lu %10lu\n"