8257970: Remove julong types in os::limit_heap_by_allocatable_memory

Reviewed-by: stefank, tschatzl
This commit is contained in:
Per Liden 2020-12-11 10:17:21 +00:00
parent b28b0947d9
commit b5592c05ad
6 changed files with 19 additions and 19 deletions

View file

@ -852,16 +852,16 @@ julong os::physical_memory() {
return win32::physical_memory();
}
bool os::has_allocatable_memory_limit(julong* limit) {
bool os::has_allocatable_memory_limit(size_t* limit) {
MEMORYSTATUSEX ms;
ms.dwLength = sizeof(ms);
GlobalMemoryStatusEx(&ms);
#ifdef _LP64
*limit = (julong)ms.ullAvailVirtual;
*limit = (size_t)ms.ullAvailVirtual;
return true;
#else
// Limit to 1400m because of the 2gb address space wall
*limit = MIN2((julong)1400*M, (julong)ms.ullAvailVirtual);
*limit = MIN2((size_t)1400*M, (size_t)ms.ullAvailVirtual);
return true;
#endif
}