src/os/bsd/vm/os_bsd.cpp

changeset 4854
754c24457b20
parent 4713
252ad8d5f22b
child 4891
8be1318fbe77
equal deleted inserted replaced
4853:2e093b564241 4854:754c24457b20
163 return physical_memory() >> 2; 163 return physical_memory() >> 2;
164 } 164 }
165 165
166 julong os::physical_memory() { 166 julong os::physical_memory() {
167 return Bsd::physical_memory(); 167 return Bsd::physical_memory();
168 }
169
170 julong os::allocatable_physical_memory(julong size) {
171 #ifdef _LP64
172 return size;
173 #else
174 julong result = MIN2(size, (julong)3800*M);
175 if (!is_allocatable(result)) {
176 // See comments under solaris for alignment considerations
177 julong reasonable_size = (julong)2*G - 2 * os::vm_page_size();
178 result = MIN2(size, reasonable_size);
179 }
180 return result;
181 #endif // _LP64
182 } 168 }
183 169
184 //////////////////////////////////////////////////////////////////////////////// 170 ////////////////////////////////////////////////////////////////////////////////
185 // environment support 171 // environment support
186 172

mercurial