From 9fa641d946aa2570f8c8c6e54f65d45875263575 Mon Sep 17 00:00:00 2001 From: bugmaster Date: Fri, 13 Apr 2012 16:34:10 +0400 Subject: [PATCH] Correction of compilation errors --- src/OSD/OSD_MemInfo.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx index b493bbde65..83cef537b3 100644 --- a/src/OSD/OSD_MemInfo.cxx +++ b/src/OSD/OSD_MemInfo.cxx @@ -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];