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

Function getTotalSystemMemory

src/utils/memory.cpp:187–197  ·  view source on GitHub ↗

* @brief Returns the total size of system RAM (in bytes). * * When the size cannot be obtained, it returns @c 0. */

Source from the content-addressed store, hash-verified

185* When the size cannot be obtained, it returns @c 0.
186*/
187std::size_t getTotalSystemMemory() {
188#ifdef OS_WINDOWS
189 return getTotalSystemMemoryOnWindows();
190#elif defined(OS_MACOS)
191 return getTotalSystemMemoryOnMacOS();
192#elif defined(OS_BSD)
193 return getTotalSystemMemoryOnBSD();
194#else
195 return getTotalSystemMemoryOnLinux();
196#endif
197}
198
199/**
200* @brief Limits system memory to the given size (in bytes).

Callers 3

SetUpMethod · 0.85
TEST_FFunction · 0.85

Tested by 2

SetUpMethod · 0.68
TEST_FFunction · 0.68