mirror of
https://github.com/openjdk/jdk8u.git
synced 2025-12-11 14:00:23 -06:00
6629887: 64-bit windows should not restrict default heap size to 1400m
Reviewed-by: jmasa, sbohne, ikrylov, xlu
This commit is contained in:
parent
b3b837074b
commit
4576d7abf7
@ -116,6 +116,20 @@ julong os::physical_memory() {
|
|||||||
return Linux::physical_memory();
|
return Linux::physical_memory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
julong os::allocatable_physical_memory(julong size) {
|
||||||
|
#ifdef _LP64
|
||||||
|
return size;
|
||||||
|
#else
|
||||||
|
julong result = MIN2(size, (julong)3800*M);
|
||||||
|
if (!is_allocatable(result)) {
|
||||||
|
// See comments under solaris for alignment considerations
|
||||||
|
julong reasonable_size = (julong)2*G - 2 * os::vm_page_size();
|
||||||
|
result = MIN2(size, reasonable_size);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
#endif // _LP64
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// environment support
|
// environment support
|
||||||
|
|
||||||
|
|||||||
@ -621,7 +621,12 @@ julong os::physical_memory() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
julong os::allocatable_physical_memory(julong size) {
|
julong os::allocatable_physical_memory(julong size) {
|
||||||
|
#ifdef _LP64
|
||||||
|
return size;
|
||||||
|
#else
|
||||||
|
// Limit to 1400m because of the 2gb address space wall
|
||||||
return MIN2(size, (julong)1400*M);
|
return MIN2(size, (julong)1400*M);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// VC6 lacks DWORD_PTR
|
// VC6 lacks DWORD_PTR
|
||||||
|
|||||||
@ -157,23 +157,8 @@ frame os::current_frame() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Utility functions
|
// Utility functions
|
||||||
|
|
||||||
julong os::allocatable_physical_memory(julong size) {
|
|
||||||
#ifdef AMD64
|
|
||||||
return size;
|
|
||||||
#else
|
|
||||||
julong result = MIN2(size, (julong)3800*M);
|
|
||||||
if (!is_allocatable(result)) {
|
|
||||||
// See comments under solaris for alignment considerations
|
|
||||||
julong reasonable_size = (julong)2*G - 2 * os::vm_page_size();
|
|
||||||
result = MIN2(size, reasonable_size);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
#endif // AMD64
|
|
||||||
}
|
|
||||||
|
|
||||||
// From IA32 System Programming Guide
|
// From IA32 System Programming Guide
|
||||||
enum {
|
enum {
|
||||||
trap_page_fault = 0xE
|
trap_page_fault = 0xE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user