comparison src/os/linux/vm/os_linux.cpp @ 20:e195fe4c40c7

6629887: 64-bit windows should not restrict default heap size to 1400m Reviewed-by: jmasa, sbohne, ikrylov, xlu
author phh
date Wed, 05 Dec 2007 09:04:00 -0800
parents a61af66fc99e
children cd0742ba123c
comparison
equal deleted inserted replaced
19:a73cc31728fe 20:e195fe4c40c7
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