aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorrezny <rezny@FreeBSD.org>2017-07-15 18:04:13 +0800
committerrezny <rezny@FreeBSD.org>2017-07-15 18:04:13 +0800
commit991d73af027a5904db6c8620874b6357e65ae904 (patch)
tree2bcc43998cb7e049c807aadc9a88eb4d0cabb0d5 /sysutils
parent074f6d73ccf252c820a9eba889e3b91f7b435d4c (diff)
downloadfreebsd-ports-gnome-991d73af027a5904db6c8620874b6357e65ae904.tar.gz
freebsd-ports-gnome-991d73af027a5904db6c8620874b6357e65ae904.tar.zst
freebsd-ports-gnome-991d73af027a5904db6c8620874b6357e65ae904.zip
Account for "laundry" memory as part of "inactive" memory
Reviewed by: tcberner, groot@kde Differential Revision: https://reviews.freebsd.org/D11557
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/ksysguardd/Makefile1
-rw-r--r--sysutils/ksysguardd/files/patch-FreeBSD_Memory.c49
2 files changed, 50 insertions, 0 deletions
diff --git a/sysutils/ksysguardd/Makefile b/sysutils/ksysguardd/Makefile
index d46d3ae1aaa9..80d9a9696bb8 100644
--- a/sysutils/ksysguardd/Makefile
+++ b/sysutils/ksysguardd/Makefile
@@ -2,6 +2,7 @@
PORTNAME= ksysguardd
PORTVERSION= ${KDE4_WORKSPACE_VERSION}
+PORTREVISION= 1
CATEGORIES= sysutils kde kde-applications
DISTNAME= kde-workspace-${PORTVERSION}
diff --git a/sysutils/ksysguardd/files/patch-FreeBSD_Memory.c b/sysutils/ksysguardd/files/patch-FreeBSD_Memory.c
new file mode 100644
index 000000000000..1eb46370dd8a
--- /dev/null
+++ b/sysutils/ksysguardd/files/patch-FreeBSD_Memory.c
@@ -0,0 +1,49 @@
+--- FreeBSD/Memory.c.orig 2015-08-12 07:03:15 UTC
++++ FreeBSD/Memory.c
+@@ -37,13 +37,14 @@
+
+ #define MEM_ACTIVE 0
+ #define MEM_INACTIVE 1
+-#define MEM_WIRED 2
+-#define MEM_CACHED 3
+-#define MEM_BUFFERED 4
+-#define MEM_FREE 5
+-#define MEM_TOTAL 6
++#define MEM_LAUNDRY 2
++#define MEM_WIRED 3
++#define MEM_CACHED 4
++#define MEM_BUFFERED 5
++#define MEM_FREE 6
++#define MEM_TOTAL 7
+
+-static size_t memory_stats[7];
++static size_t memory_stats[8];
+
+ #define SWAP_IN 0
+ #define SWAP_OUT 1
+@@ -133,6 +134,7 @@ int updateMemory(void)
+ */
+ GETPAGESYSCTL("vm.stats.vm.v_active_count", memory_stats[MEM_ACTIVE])
+ GETPAGESYSCTL("vm.stats.vm.v_inactive_count", memory_stats[MEM_INACTIVE])
++ GETPAGESYSCTL("vm.stats.vm.v_laundry_count", memory_stats[MEM_LAUNDRY])
+ GETPAGESYSCTL("vm.stats.vm.v_wire_count", memory_stats[MEM_WIRED])
+ GETPAGESYSCTL("vm.stats.vm.v_cache_count", memory_stats[MEM_CACHED])
+ GETPAGESYSCTL("vm.stats.vm.v_free_count", memory_stats[MEM_FREE])
+@@ -184,7 +186,7 @@ void printMActiveInfo(const char* cmd)
+
+ void printMInactive(const char* cmd)
+ {
+- fprintf(CurrentClient, "%lu\n", memory_stats[MEM_INACTIVE]);
++ fprintf(CurrentClient, "%lu\n", memory_stats[MEM_INACTIVE] + memory_stats[MEM_LAUNDRY]);
+ }
+
+ void printMInactiveInfo(const char* cmd)
+@@ -194,7 +196,7 @@ void printMInactiveInfo(const char* cmd)
+
+ void printMApplication(const char* cmd)
+ {
+- fprintf(CurrentClient, "%lu\n", memory_stats[MEM_ACTIVE] + memory_stats[MEM_INACTIVE]);
++ fprintf(CurrentClient, "%lu\n", memory_stats[MEM_ACTIVE] + memory_stats[MEM_INACTIVE] + memory_stats[MEM_LAUNDRY]);
+ }
+
+ void printMApplicationInfo(const char* cmd)