* @brief Returns the total size of system RAM (in bytes). * * When the size cannot be obtained, it returns @c 0. */
| 185 | * When the size cannot be obtained, it returns @c 0. |
| 186 | */ |
| 187 | std::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). |