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
@ -3796,6 +3796,11 @@ void os::win32::initialize_system_info() {
|
|||||||
GlobalMemoryStatusEx(&ms);
|
GlobalMemoryStatusEx(&ms);
|
||||||
_physical_memory = ms.ullTotalPhys;
|
_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;
|
OSVERSIONINFOEX oi;
|
||||||
oi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
oi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||||
GetVersionEx((OSVERSIONINFO*)&oi);
|
GetVersionEx((OSVERSIONINFO*)&oi);
|
||||||
|
Loading…
Reference in New Issue
Block a user