changeset 1733:ecce6110c3dc

Only OpenBSD/i386 needs lower max memory limits. Perform check after MAX_VM_MEMORY is calculated to ensure it is limited properly on OpenBSD/i386.
author kurt
date Tue, 06 Oct 2009 22:03:20 -0400
parents 38dbdfe555d0
children b436a71e29d5
files make/common/shared/Platform.gmk
diffstat 1 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/shared/Platform.gmk	Sun Oct 04 22:18:04 2009 -0400
+++ b/make/common/shared/Platform.gmk	Tue Oct 06 22:03:20 2009 -0400
@@ -472,13 +472,6 @@
 #    system swapping during the build.
 #    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
 #    Don't set VM max over 1024-128=896.
-#    736 is the max.
-ifeq ($(OS_VENDOR), OpenBSD)
-  ABS_MAX_MEMORY := "736"
-else
-  ABS_MAX_MEMORY := "896"
-endif
-
 ifeq ($(JDK_HAS_MEM_INFO),)
   JDK_HAS_MEM_INFO=true
   export JDK_HAS_MEM_INFO
@@ -493,7 +486,7 @@
       if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
         expr $(MB_OF_MEMORY) '-' 128 2> $(DEV_NULL) ; \
       else \
-        echo $(ABS_MAX_MEMORY); \
+        echo "896"; \
       fi)
     MIN_VM_MEMORY := $(shell \
       if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
@@ -513,6 +506,18 @@
   export MIN_VM_MEMORY
 endif
 
+# for OpenBSD/i386 limit to 736 max
+ifeq ($(OS_VENDOR), OpenBSD)
+  ifeq ($(ARCH_DATA_MODEL), 32)
+    MAX_VM_MEMORY := $(shell \
+      if [ $(MAX_VM_MEMORY) -gt 736 ] ; then \
+        echo "736"; \
+      else \
+        echo "$(MAX_VM_MEMORY)" ; \
+      fi)
+  endif
+endif
+
 # If blanks in the username, use the first 4 words and pack them together
 _USER1:=$(subst ', ,$(_USER))
 _USER2:=$(subst ", ,$(_USER1))