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 |