Skip to content

Commit 853c9b1

Browse files
committed
Fix for Windows
1 parent f5d0cc2 commit 853c9b1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

bin/create_sys_image

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,13 @@ else
8787
exit 1
8888
fi
8989

90-
totalmem=$(grep MemTotal /proc/meminfo | awk '{printf "%i", $2 / 1024}')
91-
if [[ $totalmem -lt 27000 ]]; then
92-
echo "Warning: Less than 27GB of memory detected. Using only one thread for sysimage compilation."
93-
export JULIA_IMAGE_THREADS=1
90+
# Check memory only on Linux (not available on Windows)
91+
if [[ "$OSTYPE" != "msys" && "$OSTYPE" != "win32" ]]; then
92+
totalmem=$(grep MemTotal /proc/meminfo | awk '{printf "%i", $2 / 1024}')
93+
if [[ $totalmem -lt 27000 ]]; then
94+
echo "Warning: Less than 27GB of memory detected. Using only one thread for sysimage compilation."
95+
export JULIA_IMAGE_THREADS=1
96+
fi
9497
fi
9598

9699
julia_version=$($JULIA_CMD --version | awk '{print($3)}')

0 commit comments

Comments
 (0)