mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
Correction of compilation errors
This commit is contained in:
parent
1e743e91ab
commit
9fa641d946
@ -65,15 +65,22 @@ void OSD_MemInfo::Update()
|
|||||||
|
|
||||||
// use Psapi library
|
// use Psapi library
|
||||||
HANDLE aProcess = GetCurrentProcess();
|
HANDLE aProcess = GetCurrentProcess();
|
||||||
|
#if (_WIN32_WINNT >= 0x0501)
|
||||||
PROCESS_MEMORY_COUNTERS_EX aProcMemCnts;
|
PROCESS_MEMORY_COUNTERS_EX aProcMemCnts;
|
||||||
|
#else
|
||||||
|
PROCESS_MEMORY_COUNTERS aProcMemCnts;
|
||||||
|
#endif
|
||||||
if (GetProcessMemoryInfo (aProcess, (PROCESS_MEMORY_COUNTERS* )&aProcMemCnts, sizeof(aProcMemCnts)))
|
if (GetProcessMemoryInfo (aProcess, (PROCESS_MEMORY_COUNTERS* )&aProcMemCnts, sizeof(aProcMemCnts)))
|
||||||
{
|
{
|
||||||
|
#if (_WIN32_WINNT >= 0x0501)
|
||||||
myCounters[MemPrivate] = aProcMemCnts.PrivateUsage;
|
myCounters[MemPrivate] = aProcMemCnts.PrivateUsage;
|
||||||
|
#endif
|
||||||
myCounters[MemWorkingSet] = aProcMemCnts.WorkingSetSize;
|
myCounters[MemWorkingSet] = aProcMemCnts.WorkingSetSize;
|
||||||
myCounters[MemWorkingSetPeak] = aProcMemCnts.PeakWorkingSetSize;
|
myCounters[MemWorkingSetPeak] = aProcMemCnts.PeakWorkingSetSize;
|
||||||
myCounters[MemSwapUsage] = aProcMemCnts.PagefileUsage;
|
myCounters[MemSwapUsage] = aProcMemCnts.PagefileUsage;
|
||||||
myCounters[MemSwapUsagePeak] = aProcMemCnts.PeakPagefileUsage;
|
myCounters[MemSwapUsagePeak] = aProcMemCnts.PeakPagefileUsage;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif (defined(__linux__) || defined(__linux))
|
#elif (defined(__linux__) || defined(__linux))
|
||||||
// use procfs on Linux
|
// use procfs on Linux
|
||||||
char aBuff[4096];
|
char aBuff[4096];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user