From 84c4bd5a0e12148eea4f844b6ff3ad5e00ddb8d9 Mon Sep 17 00:00:00 2001 From: Valentino Orlandi Date: Sat, 17 Feb 2024 20:41:23 +0100 Subject: [PATCH] Fix for BSD --- logdoctor/utilities/memory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logdoctor/utilities/memory.cpp b/logdoctor/utilities/memory.cpp index 20cd4b74..f0a9b376 100644 --- a/logdoctor/utilities/memory.cpp +++ b/logdoctor/utilities/memory.cpp @@ -45,10 +45,10 @@ size_t availableMemory() { size_t vmt_size{ sizeof(vmt) }; size_t uint_size{ sizeof(page_size) }; if ( sysctlbyname("vm.vmtotal", &vmt, &vmt_size, NULL, 0) < 0 ) { - throw DoNotCatchException("Failed to get vmtotal"); + throw DoNotCatchException("Failed to get vmtotal", "failed"); } if ( sysctlbyname("vm.stats.vm.v_page_size", &page_size, &uint_size, NULL, 0) < 0 ) { - throw DoNotCatchException("Failed to get v_page_size"); + throw DoNotCatchException("Failed to get v_page_size", "failed"); } return vmt.t_free * static_cast( page_size ); #elif defined( Q_OS_UNIX )