diff src/os/bsd/vm/os_bsd.cpp @ 5982:124fc080dc67

7112912: Message "Error occurred during initialization of VM" on boxes with lots of RAM Summary: Ergonomics now also takes available virtual memory into account when deciding for a heap size. The helper method to determine the maximum allocatable memory block now uses the appropriate OS specific calls to retrieve available virtual memory for the java process. In 32 bit environments this method now also searches for the maximum actually reservable amount of memory. Merge previously separate implementations for Linux/BSD/Solaris into a single method. Reviewed-by: jmasa, tamao
author tschatzl
date Tue, 18 Apr 2017 04:54:54 +0100
parents ccb68f77d07a
children b86041bd7b99
line wrap: on
line diff
--- a/src/os/bsd/vm/os_bsd.cpp	Thu Feb 16 08:07:06 2017 +0100
+++ b/src/os/bsd/vm/os_bsd.cpp	Tue Apr 18 04:54:54 2017 +0100
@@ -215,20 +215,6 @@
   return Bsd::physical_memory();
 }
 
-julong os::allocatable_physical_memory(julong size) {
-#ifdef _LP64
-  return size;
-#else
-  julong result = MIN2(size, (julong)3800*M);
-   if (!is_allocatable(result)) {
-     // See comments under solaris for alignment considerations
-     julong reasonable_size = (julong)2*G - 2 * os::vm_page_size();
-     result =  MIN2(size, reasonable_size);
-   }
-   return result;
-#endif // _LP64
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 // environment support