From f670e4a487c502017c2c65dfba9800ec3719c39a Mon Sep 17 00:00:00 2001 From: Medi Mohamadi <33964750+3ripleM@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:00:50 -0500 Subject: [PATCH] fix: darwin memory calculation in MB instead of bytes --- bin/codeql-utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/codeql-utils b/bin/codeql-utils index eafff45..1f78941 100755 --- a/bin/codeql-utils +++ b/bin/codeql-utils @@ -143,7 +143,7 @@ memory() { # Get the memory of the system if [[ "$OSTYPE" == "darwin"* ]]; then # MacOS - MEMORY=$(sysctl -n hw.memsize) + MEMORY=$(($(sysctl -n hw.memsize) / 1024 / 1024)) else # Linux MEMORY=$(free -m | awk 'NR==2{print $2}')