hotspot/src/os/linux/vm/os_linux.cpp
changeset 193 171c404abf72
parent 1 489c9b5090e2
child 235 735f15bdea80
equal deleted inserted replaced
192:d66300cdf939 193:171c404abf72
   112   return (julong)si.freeram * si.mem_unit;
   112   return (julong)si.freeram * si.mem_unit;
   113 }
   113 }
   114 
   114 
   115 julong os::physical_memory() {
   115 julong os::physical_memory() {
   116   return Linux::physical_memory();
   116   return Linux::physical_memory();
       
   117 }
       
   118 
       
   119 julong os::allocatable_physical_memory(julong size) {
       
   120 #ifdef _LP64
       
   121   return size;
       
   122 #else
       
   123   julong result = MIN2(size, (julong)3800*M);
       
   124    if (!is_allocatable(result)) {
       
   125      // See comments under solaris for alignment considerations
       
   126      julong reasonable_size = (julong)2*G - 2 * os::vm_page_size();
       
   127      result =  MIN2(size, reasonable_size);
       
   128    }
       
   129    return result;
       
   130 #endif // _LP64
   117 }
   131 }
   118 
   132 
   119 ////////////////////////////////////////////////////////////////////////////////
   133 ////////////////////////////////////////////////////////////////////////////////
   120 // environment support
   134 // environment support
   121 
   135