Fixed: Use GlobalMemoryStatusEx instead of GlobalMemoryStatus (returns 64 bits numbers)
--HG-- branch : develop
This commit is contained in:
parent
b4f69007f6
commit
53bae35fc4
1 changed files with 9 additions and 9 deletions
|
@ -1470,9 +1470,9 @@ uint64 CSystemInfo::availableHDSpace (const string &filename)
|
||||||
uint64 CSystemInfo::availablePhysicalMemory ()
|
uint64 CSystemInfo::availablePhysicalMemory ()
|
||||||
{
|
{
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
MEMORYSTATUS ms;
|
MEMORYSTATUSEX ms;
|
||||||
GlobalMemoryStatus (&ms);
|
GlobalMemoryStatusEx(&ms);
|
||||||
return uint64(ms.dwAvailPhys);
|
return ms.ullAvailPhys;
|
||||||
#elif defined NL_OS_MAC
|
#elif defined NL_OS_MAC
|
||||||
return uint64(getsysctlnum64("hw.usermem"));
|
return uint64(getsysctlnum64("hw.usermem"));
|
||||||
#elif defined NL_OS_UNIX
|
#elif defined NL_OS_UNIX
|
||||||
|
@ -1485,9 +1485,9 @@ uint64 CSystemInfo::availablePhysicalMemory ()
|
||||||
uint64 CSystemInfo::totalPhysicalMemory ()
|
uint64 CSystemInfo::totalPhysicalMemory ()
|
||||||
{
|
{
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
MEMORYSTATUS ms;
|
MEMORYSTATUSEX ms;
|
||||||
GlobalMemoryStatus (&ms);
|
GlobalMemoryStatusEx(&ms);
|
||||||
return uint64(ms.dwTotalPhys);
|
return ms.ullTotalPhys;
|
||||||
#elif defined NL_OS_MAC
|
#elif defined NL_OS_MAC
|
||||||
return uint64(getsysctlnum64("hw.physmem"));
|
return uint64(getsysctlnum64("hw.physmem"));
|
||||||
#elif defined NL_OS_UNIX
|
#elif defined NL_OS_UNIX
|
||||||
|
@ -1867,9 +1867,9 @@ bool CSystemInfo::getVideoInfo (std::string &deviceName, uint64 &driverVersion)
|
||||||
uint64 CSystemInfo::virtualMemory ()
|
uint64 CSystemInfo::virtualMemory ()
|
||||||
{
|
{
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
MEMORYSTATUS ms;
|
MEMORYSTATUSEX ms;
|
||||||
GlobalMemoryStatus (&ms);
|
GlobalMemoryStatusEx(&ms);
|
||||||
return uint64(ms.dwTotalVirtual - ms.dwAvailVirtual);
|
return ms.ullTotalVirtual - ms.ullAvailVirtual;
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue