src/os/windows/vm/os_windows.cpp
Print this page
*** 683,698 ****
julong os::physical_memory() {
return win32::physical_memory();
}
! 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);
#endif
}
// VC6 lacks DWORD_PTR
#if _MSC_VER < 1300
--- 683,703 ----
julong os::physical_memory() {
return win32::physical_memory();
}
! bool os::has_allocatable_memory_limit(julong& limit) {
! MEMORYSTATUSEX ms;
! ms.dwLength = sizeof(ms);
! GlobalMemoryStatusEx(&ms);
#ifdef _LP64
! limit = (julong)ms.ullAvailVirtual;
! return true;
#else
// Limit to 1400m because of the 2gb address space wall
! limit = MIN2((julong)1400*M, (julong)ms.ullAvailVirtual);
! return true;
#endif
}
// VC6 lacks DWORD_PTR
#if _MSC_VER < 1300