mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 15:12:11 +08:00
building-notes: Use bc instead of bash built-in for converting GB to B
It's more readable. Also add an explanation about 2^30.
This commit is contained in:
parent
33c1959ae0
commit
087dc222a5
@ -364,7 +364,7 @@ systemd-run --user --pty --pipe --wait -G -d \
|
||||
sudo sh -c \
|
||||
"echo 0-3 > /sys/fs/cgroup/$$/cpuset.cpus"
|
||||
sudo sh -c \
|
||||
"echo $((8 << 30)) > /sys/fs/cgroup/$$/memory.high"
|
||||
"echo $(bc -e '8*2^30') > /sys/fs/cgroup/$$/memory.high"
|
||||
(
|
||||
sudo sh -c "echo $BASHPID > /sys/fs/cgroup/$$/cgroup.procs"
|
||||
exec make -j5
|
||||
@ -378,8 +378,9 @@ EOF</userinput></screen>
|
||||
<parameter>MemoryHigh=8G</parameter>
|
||||
</phrase>
|
||||
<phrase revision='sysv'>
|
||||
<literal>8589934592</literal> (expanded from
|
||||
<userinput>$((8 << 30))</userinput>) in the
|
||||
<literal>8589934592</literal> (the output of
|
||||
<userinput>bc -e '8*2^30'</userinput>, 2^30 represents
|
||||
2<superscript>30</superscript>, i.e. a Gigabyte) in the
|
||||
<filename>memory.high</filename> entry
|
||||
</phrase>, a soft limit of memory usage is set.
|
||||
If the processes in the cgroup (<command>make</command> and all the
|
||||
|
Loading…
Reference in New Issue
Block a user