diff options
author | gahr <gahr@FreeBSD.org> | 2008-07-02 01:43:33 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2008-07-02 01:43:33 +0800 |
commit | 1a9f937d6c7e12683730468860a563ee6ccacef2 (patch) | |
tree | 1662e83741d2867ca4fdab8d54d7858444274e89 /sysutils | |
parent | b6fbb0a18bdc853f219371fae36f02dbc14a64df (diff) | |
download | freebsd-ports-gnome-1a9f937d6c7e12683730468860a563ee6ccacef2.tar.gz freebsd-ports-gnome-1a9f937d6c7e12683730468860a563ee6ccacef2.tar.zst freebsd-ports-gnome-1a9f937d6c7e12683730468860a563ee6ccacef2.zip |
- Fix swap monitor
PR: 124441
Submitted by: Walter C. Pelissero <walter.pelissero@iesy.net>
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/wmmemfree/Makefile | 2 | ||||
-rw-r--r-- | sysutils/wmmemfree/files/mem_freebsd.c | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/sysutils/wmmemfree/Makefile b/sysutils/wmmemfree/Makefile index 83073c8bb9a4..825c6f0d3faf 100644 --- a/sysutils/wmmemfree/Makefile +++ b/sysutils/wmmemfree/Makefile @@ -7,7 +7,7 @@ PORTNAME= wmmemfree PORTVERSION= 0.7 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils windowmaker MASTER_SITES= ${MASTER_SITE_SUNSITE} MASTER_SITE_SUBDIR= X11/xutils diff --git a/sysutils/wmmemfree/files/mem_freebsd.c b/sysutils/wmmemfree/files/mem_freebsd.c index 2198f0069ca8..5575ee31792c 100644 --- a/sysutils/wmmemfree/files/mem_freebsd.c +++ b/sysutils/wmmemfree/files/mem_freebsd.c @@ -77,8 +77,6 @@ mem_getfree() unsigned long bufspace_offset; static int firsttime = 1; - static int pagesin = -1; - static int pagesout = -1; static time_t lasttime = 0; time_t curtime; @@ -105,10 +103,7 @@ mem_getfree() curtime = time(NULL); - if (firsttime || - (((vm.v_swappgsin > pagesin) || - (vm.v_swappgsout > pagesout)) - && curtime > lasttime + 1)) + if (firsttime || curtime > lasttime + 5) { if (kvm_getswapinfo(kd, &sw, 1, 0) >= 0 && sw.ksw_total) @@ -120,6 +115,4 @@ mem_getfree() firsttime = 0; lasttime = curtime; } - pagesin = vm.v_swappgsin; - pagesout = vm.v_swappgsout; } |