Fix error message when swap is disabled
Bug: 65465 Change-Id: Ibb1b14f5271d60c039398e8ce8a9c2a5d245241f
This commit is contained in:
parent
bfe28c103d
commit
29f4fd5035
1 changed files with 4 additions and 1 deletions
|
|
@ -76,7 +76,10 @@ if [ "$MW_MEM_LIMIT" -gt 0 ]; then
|
||||||
# Memory
|
# Memory
|
||||||
echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.limit_in_bytes
|
echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.limit_in_bytes
|
||||||
# Memory+swap
|
# Memory+swap
|
||||||
echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes
|
# This will be missing if there is no swap
|
||||||
|
if [ -e "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes ]; then
|
||||||
|
echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ulimit -v "$MW_MEM_LIMIT"
|
ulimit -v "$MW_MEM_LIMIT"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue