hotspot/src/os/linux/vm/os_linux.cpp
changeset 16605 ba13efd453bc
parent 15927 f256c20146f4
child 16609 f3dd8996c955
equal deleted inserted replaced
16604:800a65bfe347 16605:ba13efd453bc
   190   return (julong)si.freeram * si.mem_unit;
   190   return (julong)si.freeram * si.mem_unit;
   191 }
   191 }
   192 
   192 
   193 julong os::physical_memory() {
   193 julong os::physical_memory() {
   194   return Linux::physical_memory();
   194   return Linux::physical_memory();
   195 }
       
   196 
       
   197 julong os::allocatable_physical_memory(julong size) {
       
   198 #ifdef _LP64
       
   199   return size;
       
   200 #else
       
   201   julong result = MIN2(size, (julong)3800*M);
       
   202    if (!is_allocatable(result)) {
       
   203      // See comments under solaris for alignment considerations
       
   204      julong reasonable_size = (julong)2*G - 2 * os::vm_page_size();
       
   205      result =  MIN2(size, reasonable_size);
       
   206    }
       
   207    return result;
       
   208 #endif // _LP64
       
   209 }
   195 }
   210 
   196 
   211 ////////////////////////////////////////////////////////////////////////////////
   197 ////////////////////////////////////////////////////////////////////////////////
   212 // environment support
   198 // environment support
   213 
   199