File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1229,7 +1229,7 @@ uint64_t GCToOSInterface::GetPhysicalMemoryLimit(bool* is_restricted)
1229
1229
return 0 ;
1230
1230
}
1231
1231
1232
- return pages * pageSize;
1232
+ return ( uint64_t ) pages * ( uint64_t ) pageSize;
1233
1233
#elif HAVE_SYSCTL
1234
1234
int mib[3 ];
1235
1235
mib[0 ] = CTL_HW;
Original file line number Diff line number Diff line change @@ -338,10 +338,10 @@ GlobalMemoryStatusEx(
338
338
339
339
// Get the physical memory size
340
340
#if HAVE_SYSCONF && HAVE__SC_PHYS_PAGES
341
- int64_t physical_memory;
341
+ uint64_t physical_memory;
342
342
343
343
// Get the Physical memory size
344
- physical_memory = sysconf ( _SC_PHYS_PAGES ) * sysconf ( _SC_PAGE_SIZE );
344
+ physical_memory = (( uint64_t ) sysconf ( _SC_PHYS_PAGES )) * (( uint64_t ) sysconf ( _SC_PAGE_SIZE ) );
345
345
lpBuffer->ullTotalPhys = (DWORDLONG)physical_memory;
346
346
fRetVal = TRUE ;
347
347
#elif HAVE_SYSCTL
You can’t perform that action at this time.
0 commit comments