hotspot/src/os/linux/vm/os_linux.cpp
changeset 193 171c404abf72
parent 1 489c9b5090e2
child 235 735f15bdea80
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Wed Dec 05 09:03:00 2007 -0800
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Wed Dec 05 09:04:00 2007 -0800
@@ -116,6 +116,20 @@
   return Linux::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