summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/win/CPP/Windows/System.cpp
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-04-06 13:33:38 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-04-13 11:32:09 +0300
commit96ade47c182bf37a2efca2aa62922e54e5ff1660 (patch)
tree93ceee6c6f8984f563f3dfe83e56f98b66b40f3a /src/libs/7zip/win/CPP/Windows/System.cpp
parent2d5f0ffaf1278516bbd74e3b60f9849f4c51cffa (diff)
Move LZMA SDK to 3rdparty subdirectory
Also add attribution document. Task-number: QTIFW-2336 Change-Id: I91546bc6c3ace244e4b546b945f40b7d204f7463 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/libs/7zip/win/CPP/Windows/System.cpp')
-rw-r--r--src/libs/7zip/win/CPP/Windows/System.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/libs/7zip/win/CPP/Windows/System.cpp b/src/libs/7zip/win/CPP/Windows/System.cpp
deleted file mode 100644
index 4bc8d2a3f..000000000
--- a/src/libs/7zip/win/CPP/Windows/System.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// Windows/System.cpp
-
-#include "StdAfx.h"
-
-#include "../Common/Defs.h"
-
-#include "System.h"
-
-namespace NWindows {
-namespace NSystem {
-
-UInt32 GetNumberOfProcessors()
-{
- SYSTEM_INFO systemInfo;
- GetSystemInfo(&systemInfo);
- return (UInt32)systemInfo.dwNumberOfProcessors;
-}
-
-#ifndef UNDER_CE
-
-#if !defined(_WIN64) && defined(__GNUC__)
-
-typedef struct _MY_MEMORYSTATUSEX {
- DWORD dwLength;
- DWORD dwMemoryLoad;
- DWORDLONG ullTotalPhys;
- DWORDLONG ullAvailPhys;
- DWORDLONG ullTotalPageFile;
- DWORDLONG ullAvailPageFile;
- DWORDLONG ullTotalVirtual;
- DWORDLONG ullAvailVirtual;
- DWORDLONG ullAvailExtendedVirtual;
-} MY_MEMORYSTATUSEX, *MY_LPMEMORYSTATUSEX;
-
-#else
-
-#define MY_MEMORYSTATUSEX MEMORYSTATUSEX
-#define MY_LPMEMORYSTATUSEX LPMEMORYSTATUSEX
-
-#endif
-
-typedef BOOL (WINAPI *GlobalMemoryStatusExP)(MY_LPMEMORYSTATUSEX lpBuffer);
-
-#endif
-
-UInt64 GetRamSize()
-{
- #ifndef UNDER_CE
- MY_MEMORYSTATUSEX stat;
- stat.dwLength = sizeof(stat);
- #endif
- #ifdef _WIN64
- if (!::GlobalMemoryStatusEx(&stat))
- return 0;
- return MyMin(stat.ullTotalVirtual, stat.ullTotalPhys);
- #else
- #ifndef UNDER_CE
- GlobalMemoryStatusExP globalMemoryStatusEx = (GlobalMemoryStatusExP)
- ::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")), "GlobalMemoryStatusEx");
- if (globalMemoryStatusEx != 0 && globalMemoryStatusEx(&stat))
- return MyMin(stat.ullTotalVirtual, stat.ullTotalPhys);
- #endif
- {
- MEMORYSTATUS stat;
- stat.dwLength = sizeof(stat);
- ::GlobalMemoryStatus(&stat);
- return MyMin(stat.dwTotalVirtual, stat.dwTotalPhys);
- }
- #endif
-}
-
-}}