Index: head/sysutils/tmux-mem-cpu-load/Makefile =================================================================== --- head/sysutils/tmux-mem-cpu-load/Makefile (revision 520650) +++ head/sysutils/tmux-mem-cpu-load/Makefile (revision 520651) @@ -1,23 +1,21 @@ # Created by: Adam Weinberger # $FreeBSD$ PORTNAME= tmux-mem-cpu-load PORTVERSION= 3.4.0 -PORTREVISION= 3 +PORTREVISION= 4 DISTVERSIONPREFIX= v CATEGORIES= sysutils MAINTAINER= adamw@FreeBSD.org COMMENT= CPU, RAM, and load monitor for use with tmux LICENSE= APACHE20 - -RUN_DEPENDS= tmux:sysutils/tmux USES= cmake compiler:c++11-lang USE_GITHUB= yes GH_ACCOUNT= thewtex PLIST_FILES= bin/tmux-mem-cpu-load .include Index: head/sysutils/tmux-mem-cpu-load/files/patch-freebsd_memory.cc =================================================================== --- head/sysutils/tmux-mem-cpu-load/files/patch-freebsd_memory.cc (nonexistent) +++ head/sysutils/tmux-mem-cpu-load/files/patch-freebsd_memory.cc (revision 520651) @@ -0,0 +1,24 @@ +From e24890652e3674fe4677722aab8644e62da37348 Mon Sep 17 00:00:00 2001 +From: Dima Panov +Date: Fri, 20 Dec 2019 02:47:32 +1000 +Subject: [PATCH] Fix calculate memory usage on FreeBSD + +--- + freebsd/memory.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/freebsd/memory.cc b/freebsd/memory.cc +index 5500032..687a0a8 100644 +--- freebsd/memory.cc ++++ freebsd/memory.cc +@@ -63,8 +63,8 @@ void mem_status( MemoryStatus & status ) + //u_int unused = ( cache + inactive + free ) * page_size; + + // Used memory on FreeBSD is active + wired. +- u_int used = ( active + wired ) * page_size; ++ u_int used = ( active + wired ); + +- status.used_mem = convert_unit( static_cast< float >( used ), MEGABYTES ); ++ status.used_mem = convert_unit( static_cast< float >( used * (page_size >> 10) ), MEGABYTES, KILOBYTES ); + status.total_mem = convert_unit( static_cast< float >( page_count * (page_size >> 10) ), MEGABYTES, KILOBYTES); + } Property changes on: head/sysutils/tmux-mem-cpu-load/files/patch-freebsd_memory.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property