From: jingui.ren Date: Thu, 21 Jun 2018 08:49:43 +0000 (+0800) Subject: when build on x86_64, no memory limit X-Git-Tag: accepted/tizen/devbase/tools/20190927.044855~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfd1c6a407dfe625a9e6f178414ddc152ee28494;p=tools%2Fbuild.git when build on x86_64, no memory limit Change-Id: Ib08e279880e264bca8d41565b52d7e2f540160a0 --- diff --git a/build b/build index fd11b70..fb572fe 100755 --- a/build +++ b/build @@ -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" }