[Xfce4-commits] <xfce4-systemload-plugin:master> FreeBSD ports/155382: Memory size overflow when >3.5GB

David Schneider noreply at xfce.org
Thu Mar 8 23:40:01 CET 2012


Updating branch refs/heads/master
         to cbb8d8c135cb8f6935c9a51e5edf3c6576ad0f74 (commit)
       from e93a6023353c5194ebc45a8fd79b698cfb63c47c (commit)

commit cbb8d8c135cb8f6935c9a51e5edf3c6576ad0f74
Author: Zhihao Yuan <lichray at gmail.com>
Date:   Thu Mar 8 14:32:31 2012 -0800

    FreeBSD ports/155382: Memory size overflow when >3.5GB

 panel-plugin/memswap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/memswap.c b/panel-plugin/memswap.c
index d671686..09bab7e 100644
--- a/panel-plugin/memswap.c
+++ b/panel-plugin/memswap.c
@@ -227,8 +227,8 @@ gint read_memswap(gulong *mem, gulong *swap, gulong *MT, gulong *MU, gulong *ST,
         return -1;
     }
 
-    *MT = (total_pages*pagesize) >> 10;
-    *MU = ((total_pages-free_pages-inactive_pages) * pagesize) >> 10;
+    *MT = CONVERT(total_pages);
+    *MU = CONVERT(total_pages-free_pages-inactive_pages);
     *mem = *MU * 100 / *MT;
 
     if((*swap = swapmode(&swap_avail, &swap_free)) >= 0) {


More information about the Xfce4-commits mailing list