~registry/stellarium/socis2015-de430

« back to all changes in this revision

Viewing changes to src/StelLogger.cpp

  • Committer: georg-zotti
  • Date: 2015-12-14 13:02:24 UTC
  • mfrom: (7721.1.367 trunk)
  • Revision ID: georg.zotti@univie.ac.at-20151214130224-g5sqnc31ghcmw0ux
merge-in trunk r8088

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
#elif defined Q_OS_WIN
131
131
        // Hopefully doesn't throw a linker error on earlier systems. Not like
132
132
        // I'm gonna test it or anything.
133
 
        if (QSysInfo::WindowsVersion >= QSysInfo::WV_2000)
 
133
        if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP)
134
134
        {
135
 
#ifdef __LP64__
136
135
                MEMORYSTATUSEX statex;
 
136
                statex.dwLength = sizeof (statex);
137
137
                GlobalMemoryStatusEx(&statex);
138
 
                writeLog(QString("Total physical memory: %1 MB (unreliable)").arg(statex.ullTotalPhys/(1024<<10)));
139
 
                writeLog(QString("Total virtual memory: %1 MB (unreliable)").arg(statex.ullTotalVirtual/(1024<<10)));
140
 
                writeLog(QString("Physical memory in use: %1%").arg(statex.dwMemoryLoad));
141
 
#else
142
 
                MEMORYSTATUS statex;
143
 
                GlobalMemoryStatus(&statex);
144
 
                writeLog(QString("Total memory: %1 MB (unreliable)").arg(statex.dwTotalPhys/(1024<<10)));
145
 
                writeLog(QString("Total virtual memory: %1 MB (unreliable)").arg(statex.dwTotalVirtual/(1024<<10)));
146
 
                writeLog(QString("Physical memory in use: %1%").arg(statex.dwMemoryLoad));
147
 
#endif
 
138
                writeLog(QString("Total physical memory: %1 MB").arg(statex.ullTotalPhys/(1024<<10)));
 
139
                writeLog(QString("Available physical memory: %1 MB").arg(statex.ullAvailPhys/(1024<<10)));
 
140
                writeLog(QString("Physical memory in use: %1%").arg(statex.dwMemoryLoad));
 
141
                #ifndef _WIN64
 
142
                // This always reports about 8TB on Win64, not really useful to show.
 
143
                writeLog(QString("Total virtual memory: %1 MB").arg(statex.ullTotalVirtual/(1024<<10)));
 
144
                writeLog(QString("Available virtual memory: %1 MB").arg(statex.ullAvailVirtual/(1024<<10)));
 
145
                #endif
148
146
        }
149
147
        else
150
148
                writeLog("Windows version too old to get memory info.");