Core/HardwareInfo: Added GetTotalMemory

Former-commit-id: 71289723115161dd253ccb65c1c91af65344c678
This commit is contained in:
Lynix
2015-05-19 14:13:48 +02:00
parent c3e5a7defc
commit 90e4a1ca52
7 changed files with 28 additions and 2 deletions

View File

@@ -38,6 +38,15 @@ unsigned int NzHardwareInfoImpl::GetProcessorCount()
return infos.dwNumberOfProcessors;
}
nzUInt64 NzHardwareInfoImpl::GetTotalMemory()
{
MEMORYSTATUSEX memStatus;
memStatus.dwLength = sizeof(memStatus);
GlobalMemoryStatusEx(&memStatus);
return memStatus.ullTotalPhys;
}
bool NzHardwareInfoImpl::IsCpuidSupported()
{
#ifdef NAZARA_PLATFORM_x64

View File

@@ -14,6 +14,7 @@ class NzHardwareInfoImpl
public:
static void Cpuid(nzUInt32 functionId, nzUInt32 subFunctionId, nzUInt32 registers[4]);
static unsigned int GetProcessorCount();
static nzUInt64 GetTotalMemory();
static bool IsCpuidSupported();
};