Skip to content

Commit

Permalink
Default compiler threads based on available RAM, but no more or less …
Browse files Browse the repository at this point in the history
…than available cores
  • Loading branch information
rdmark committed Oct 7, 2023
1 parent 10f59af commit 2ced0d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion easyinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ echo -e $logo
CONNECT_TYPE="FULLSPEC"
# clang v11 is the latest distributed by Buster
COMPILER="clang++-11"
CORES=1
MEM=$(grep MemTotal /proc/meminfo | awk '{print $2}')
CORES=`expr $MEM / 450000`
if [ $CORES -gt $(nproc) ]; then
CORES=$(nproc)
elif [ $CORES -lt 1 ]; then
CORES=1
fi
USER=$(whoami)
BASE=$(dirname "$(readlink -f "${0}")")
CPP_PATH="$BASE/cpp"
Expand Down

0 comments on commit 2ced0d3

Please sign in to comment.