Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easyinstall: Default no. of compiler threads based on available RAM #1239

Merged
merged 1 commit into from
Oct 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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