mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8161079: Default heap size causes native memory exhaustion on 32 bit Windows
Reviewed-by: tschatzl, sjohanss
This commit is contained in:
parent
37b36db885
commit
50fb03349c
1 changed files with 5 additions and 0 deletions
|
@ -3796,6 +3796,11 @@ void os::win32::initialize_system_info() {
|
|||
GlobalMemoryStatusEx(&ms);
|
||||
_physical_memory = ms.ullTotalPhys;
|
||||
|
||||
if (FLAG_IS_DEFAULT(MaxRAM)) {
|
||||
// Adjust MaxRAM according to the maximum virtual address space available.
|
||||
FLAG_SET_DEFAULT(MaxRAM, MIN2(MaxRAM, (uint64_t) ms.ullTotalVirtual));
|
||||
}
|
||||
|
||||
OSVERSIONINFOEX oi;
|
||||
oi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
GetVersionEx((OSVERSIONINFO*)&oi);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue