mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-25 20:33:35 +00:00
Default compiler threads based on available RAM, but no more or less than available cores
This commit is contained in:
parent
10f59afbae
commit
2ced0d3515
@ -49,7 +49,13 @@ echo -e $logo
|
|||||||
CONNECT_TYPE="FULLSPEC"
|
CONNECT_TYPE="FULLSPEC"
|
||||||
# clang v11 is the latest distributed by Buster
|
# clang v11 is the latest distributed by Buster
|
||||||
COMPILER="clang++-11"
|
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)
|
USER=$(whoami)
|
||||||
BASE=$(dirname "$(readlink -f "${0}")")
|
BASE=$(dirname "$(readlink -f "${0}")")
|
||||||
CPP_PATH="$BASE/cpp"
|
CPP_PATH="$BASE/cpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user