1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

Correction of compilation errors

This commit is contained in:
bugmaster 2012-04-13 16:34:10 +04:00
parent 1e743e91ab
commit 9fa641d946

View File

@ -65,15 +65,22 @@ void OSD_MemInfo::Update()
// use Psapi library
HANDLE aProcess = GetCurrentProcess();
#if (_WIN32_WINNT >= 0x0501)
PROCESS_MEMORY_COUNTERS_EX aProcMemCnts;
#else
PROCESS_MEMORY_COUNTERS aProcMemCnts;
#endif
if (GetProcessMemoryInfo (aProcess, (PROCESS_MEMORY_COUNTERS* )&aProcMemCnts, sizeof(aProcMemCnts)))
{
#if (_WIN32_WINNT >= 0x0501)
myCounters[MemPrivate] = aProcMemCnts.PrivateUsage;
#endif
myCounters[MemWorkingSet] = aProcMemCnts.WorkingSetSize;
myCounters[MemWorkingSetPeak] = aProcMemCnts.PeakWorkingSetSize;
myCounters[MemSwapUsage] = aProcMemCnts.PagefileUsage;
myCounters[MemSwapUsagePeak] = aProcMemCnts.PeakPagefileUsage;
}
#elif (defined(__linux__) || defined(__linux))
// use procfs on Linux
char aBuff[4096];