mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8257970: Remove julong types in os::limit_heap_by_allocatable_memory
Reviewed-by: stefank, tschatzl
This commit is contained in:
parent
b28b0947d9
commit
b5592c05ad
6 changed files with 19 additions and 19 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue