diff options
author | bland <bland@df743ca5-7f9a-e211-a948-0013205c9059> | 2003-12-02 14:23:48 +0800 |
---|---|---|
committer | bland <bland@df743ca5-7f9a-e211-a948-0013205c9059> | 2003-12-02 14:23:48 +0800 |
commit | 3538b5b7d8974d535d16779b2c999f28230a8f87 (patch) | |
tree | b2379e945bee016eb15fb20bd57784a077a0dc41 | |
parent | 9e9792d7663f1e569efe5640903344449b094b43 (diff) | |
download | marcuscom-ports-3538b5b7d8974d535d16779b2c999f28230a8f87.tar marcuscom-ports-3538b5b7d8974d535d16779b2c999f28230a8f87.tar.gz marcuscom-ports-3538b5b7d8974d535d16779b2c999f28230a8f87.tar.bz2 marcuscom-ports-3538b5b7d8974d535d16779b2c999f28230a8f87.tar.lz marcuscom-ports-3538b5b7d8974d535d16779b2c999f28230a8f87.tar.xz marcuscom-ports-3538b5b7d8974d535d16779b2c999f28230a8f87.tar.zst marcuscom-ports-3538b5b7d8974d535d16779b2c999f28230a8f87.zip |
- Complete glibtop_malloc() -> g_malloc() replacement.
- Put back multiplication by getpagesize() for reported memory sizes.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1387 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | devel/libgtop2/Makefile | 2 | ||||
-rw-r--r-- | devel/libgtop2/files/patch-sysdeps::freebsd::swap.c | 31 |
2 files changed, 32 insertions, 1 deletions
diff --git a/devel/libgtop2/Makefile b/devel/libgtop2/Makefile index 237bd0def..15a9c3818 100644 --- a/devel/libgtop2/Makefile +++ b/devel/libgtop2/Makefile @@ -7,7 +7,7 @@ PORTNAME= libgtop2 PORTVERSION= 2.5.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.5 diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::swap.c b/devel/libgtop2/files/patch-sysdeps::freebsd::swap.c new file mode 100644 index 000000000..e27ebad62 --- /dev/null +++ b/devel/libgtop2/files/patch-sysdeps::freebsd::swap.c @@ -0,0 +1,31 @@ +--- sysdeps/freebsd/swap.c.orig Tue Dec 2 14:57:38 2003 ++++ sysdeps/freebsd/swap.c Tue Dec 2 15:05:38 2003 +@@ -267,7 +267,7 @@ + /* List of swap devices and sizes. */ + + sw_size = nswdev * sizeof (*sw); +- sw = g_malloc (server, sw_size); ++ sw = g_malloc (sw_size); + + if (kvm_read (server->machine.kd, ptr, sw, sw_size) != (ssize_t)sw_size) { + glibtop_warn_io_r (server, "kvm_read (*swdevt)"); +@@ -367,8 +367,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; + +@@ -399,7 +399,7 @@ + return; + } + +- swaplist = g_malloc (server, nswap * sizeof (struct swapent)); ++ swaplist = g_malloc (nswap * sizeof (struct swapent)); + + if (swapctl (SWAP_STATS, swaplist, nswap) != nswap) { + glibtop_warn_io_r (server, "swapctl (SWAP_STATS)"); |