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

Function getTotalSystemMemoryOnLinux

src/utils/memory.cpp:165–169  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

163* @brief Implementation of @c getTotalSystemMemory() on Linux.
164*/
165std::size_t getTotalSystemMemoryOnLinux() {
166 struct sysinfo system_info;
167 auto rc = sysinfo(&system_info);
168 return rc == 0 ? system_info.totalram : 0;
169}
170
171/**
172* @brief Implementation of @c limitSystemMemory() on Linux.

Callers 1

getTotalSystemMemoryFunction · 0.85

Calls 1

sysinfoClass · 0.85

Tested by

no test coverage detected