GNOME Bugzilla – Bug 91702
values of swap-memory under FreeBSD is incorrect
Last modified: 2004-12-22 21:47:04 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
i'll talk to people about getting it committed
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