jdk/make/common/shared/Platform.gmk
changeset 9362 f91f98952e64
parent 8805 1a56a0bf5840
child 11368 b8048abf694e
equal deleted inserted replaced
9361:1051c04ab0b1 9362:f91f98952e64
   426 endif
   426 endif
   427 
   427 
   428 # Machines with 512Mb or less of real memory are considered low memory
   428 # Machines with 512Mb or less of real memory are considered low memory
   429 #    build machines and adjustments will be made to prevent excessing
   429 #    build machines and adjustments will be made to prevent excessing
   430 #    system swapping during the build.
   430 #    system swapping during the build.
   431 #    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
       
   432 #    Don't set VM max over 1024-128=896.
       
   433 ifeq ($(JDK_HAS_MEM_INFO),)
   431 ifeq ($(JDK_HAS_MEM_INFO),)
   434   JDK_HAS_MEM_INFO=true
   432   JDK_HAS_MEM_INFO=true
   435   export JDK_HAS_MEM_INFO
   433   export JDK_HAS_MEM_INFO
   436   ifneq ($(MB_OF_MEMORY),)
   434   ifneq ($(MB_OF_MEMORY),)
   437     LOW_MEMORY_MACHINE := $(shell \
   435     LOW_MEMORY_MACHINE := $(shell \
   438       if [ $(MB_OF_MEMORY) -le 512 ] ; then \
   436       if [ $(MB_OF_MEMORY) -le 512 ] ; then \
   439         echo "true"; \
   437         echo "true"; \
   440       else \
   438       else \
   441         echo "false"; \
   439         echo "false"; \
   442       fi)
   440       fi)
   443     MAX_VM_MEMORY := $(shell \
   441     MAX_VM_MEMORY := 512
   444       if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
   442     MIN_VM_MEMORY := $(MAX_VM_MEMORY)
   445         expr $(MB_OF_MEMORY) '-' 128 2> $(DEV_NULL) ; \
       
   446       else \
       
   447         echo "896"; \
       
   448       fi)
       
   449     MIN_VM_MEMORY := $(shell \
       
   450       if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
       
   451         expr $(MAX_VM_MEMORY) '-' 8 2> $(DEV_NULL) ; \
       
   452       else \
       
   453         echo "128"; \
       
   454       fi)
       
   455   else
   443   else
   456     MB_OF_MEMORY       := unknown
   444     MB_OF_MEMORY       := unknown
   457     LOW_MEMORY_MACHINE := true
   445     LOW_MEMORY_MACHINE := true
   458     MAX_VM_MEMORY      := 384
   446     MAX_VM_MEMORY      := 384
   459     MIN_VM_MEMORY      := 128
   447     MIN_VM_MEMORY      := 128