when build on x86_64, no memory limit 86/185786/1
authorjingui.ren <jingui.ren@samsung.com>
Thu, 2 Aug 2018 09:01:48 +0000 (17:01 +0800)
committerjingui.ren <jingui.ren@samsung.com>
Thu, 2 Aug 2018 09:01:48 +0000 (17:01 +0800)
Change-Id: I588463f2060213187accffe238e729e0cdbf942c

build

diff --git a/build b/build
index fd11b70..cdeac3d 100755 (executable)
--- 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:*)
+    case "$mem" in
+        MemTotal:*)
                set -- $mem
                eval "limit=\$(($2/3*4))"
-           ;;
-           SwapTotal:*)
+        ;;
+        SwapTotal:*)
                set -- $mem
                eval "limit=\$(($2/3*4+$limit))"
-           ;;
-       esac
+        ;;
+    esac
     done < <(cat /proc/meminfo) # cat for proc stuff
-
     ulimit -v $limit
     echo "Memory limit set to ${limit}KB"
 }