diff options
author | jingui.ren <jingui.ren@samsung.com> | 2018-06-21 16:49:43 +0800 |
---|---|---|
committer | jingui.ren <jingui.ren@samsung.com> | 2018-06-21 17:31:36 +0800 |
commit | dfd1c6a407dfe625a9e6f178414ddc152ee28494 (patch) | |
tree | 1da5e8b5ef7abf8b7b26e0e38740887770be5025 | |
parent | 35811e3151c524e235a9ba5271f3143375b39d7c (diff) | |
download | build-dfd1c6a407dfe625a9e6f178414ddc152ee28494.tar.gz build-dfd1c6a407dfe625a9e6f178414ddc152ee28494.tar.bz2 build-dfd1c6a407dfe625a9e6f178414ddc152ee28494.zip |
when build on x86_64, no memory limit
Change-Id: Ib08e279880e264bca8d41565b52d7e2f540160a0
-rwxr-xr-x | build | 28 |
1 files changed, 16 insertions, 12 deletions
@@ -516,23 +516,27 @@ setupicecream() { setmemorylimit() { if test -n "$VM_IMAGE" -o -n "$RUNNING_IN_VM" ; then - return + return + fi + arch=`uname -p` + if [ $arch == "x86_64" ];then + echo "on X86_64, no limit mem size" + return fi local mem local limit while read mem; do - case "$mem" in - MemTotal:*) - set -- $mem - eval "limit=\$(($2/3*4))" - ;; - SwapTotal:*) - set -- $mem - eval "limit=\$(($2/3*4+$limit))" - ;; - esac + case "$mem" in + MemTotal:*) + set -- $mem + eval "limit=\$(($2/3*4))" + ;; + SwapTotal:*) + set -- $mem + eval "limit=\$(($2/3*4+$limit))" + ;; + esac done < <(cat /proc/meminfo) # cat for proc stuff - ulimit -v $limit echo "Memory limit set to ${limit}KB" } |