After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 91702 - values of swap-memory under FreeBSD is incorrect
values of swap-memory under FreeBSD is incorrect
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: bsd
2.0.x
Other FreeBSD
: High major
: ---
Assigned To: anthony taranto
anthony taranto
Depends on:
Blocks:
 
 
Reported: 2002-08-26 12:07 UTC by edwin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description edwin 2002-08-26 12:07:40 UTC
libgtop2-2.0.0

The returned values of swap-memory under FreeBSD is incorrect, they are in
pages and thus should be multiplied by getpagesize():

--- sysdeps/freebsd/swap.c-old  Mon Aug 26 20:18:07 2002
+++ sysdeps/freebsd/swap.c      Mon Aug 26 20:19:18 2002
@@ -369,8 +369,8 @@
 
        buf->flags = _glibtop_sysdeps_swap;
 
-       buf->used = kvmsw[nswdev].ksw_used;
-       buf->total = kvmsw[nswdev].ksw_total;
+       buf->used = kvmsw[nswdev].ksw_used * getpagesize();
+       buf->total = kvmsw[nswdev].ksw_total * getpagesize();
 
        buf->free = buf->total - buf->used;
 
I've submitted a patch for the current libgtop2 of the freebsd ports
collection too, see http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/42028

Thanks, edwin
Comment 1 anthony taranto 2003-06-23 13:43:24 UTC
i'll talk to people about getting it committed
Comment 2 Bastien Nocera 2003-10-20 19:54:21 UTC
committed to gnome-2-4 and HEAD

2003-10-20  Bastien Nocera  <hadess@hadess.net>
                                                                     
         
        * swap.c: (glibtop_get_swap_p): fix swap sizes in FreeBSD,
        patch by edwin@mavetju.org