MCPcopy Create free account
hub / github.com/avast/retdec / getTotalSystemMemoryOnWindows

Function getTotalSystemMemoryOnWindows

src/utils/memory.cpp:51–56  ·  view source on GitHub ↗

* @brief Implementation of @c getTotalSystemMemory() on Windows. */

Source from the content-addressed store, hash-verified

49* @brief Implementation of @c getTotalSystemMemory() on Windows.
50*/
51std::size_t getTotalSystemMemoryOnWindows() {
52 MEMORYSTATUSEX memoryStatus;
53 memoryStatus.dwLength = sizeof(memoryStatus);
54 bool succeeded = GlobalMemoryStatusEx(&memoryStatus);
55 return succeeded ? memoryStatus.ullTotalPhys : 0;
56}
57
58/**
59* @brief Assigns the current process into a new job and returns a handle to

Callers 1

getTotalSystemMemoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected