Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: third_party/lzma/v4_65/files/CPP/Windows/System.cpp

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/lzma/v4_65/files/CPP/Windows/System.cpp
diff --git a/third_party/lzma/v4_65/files/CPP/Windows/System.cpp b/third_party/lzma/v4_65/files/CPP/Windows/System.cpp
deleted file mode 100644
index 8e4069c27e0fd4da87e94ee67a6900f887993c8f..0000000000000000000000000000000000000000
--- a/third_party/lzma/v4_65/files/CPP/Windows/System.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// Windows/System.cpp
-
-#include "StdAfx.h"
-
-#include "System.h"
-
-namespace NWindows {
-namespace NSystem {
-
-UInt32 GetNumberOfProcessors()
-{
- SYSTEM_INFO systemInfo;
- GetSystemInfo(&systemInfo);
- return (UInt32)systemInfo.dwNumberOfProcessors;
-}
-
-#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);
-
-UInt64 GetRamSize()
-{
- MY_MEMORYSTATUSEX stat;
- stat.dwLength = sizeof(stat);
- #ifdef _WIN64
- if (!::GlobalMemoryStatusEx(&stat))
- return 0;
- return stat.ullTotalPhys;
- #else
- GlobalMemoryStatusExP globalMemoryStatusEx = (GlobalMemoryStatusExP)
- ::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")),
- "GlobalMemoryStatusEx");
- if (globalMemoryStatusEx != 0)
- if (globalMemoryStatusEx(&stat))
- return stat.ullTotalPhys;
- {
- MEMORYSTATUS stat;
- stat.dwLength = sizeof(stat);
- GlobalMemoryStatus(&stat);
- return stat.dwTotalPhys;
- }
- #endif
-}
-
-}}
« no previous file with comments | « third_party/lzma/v4_65/files/CPP/Windows/System.h ('k') | third_party/lzma/v4_65/files/CPP/Windows/Thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698