diff options
| author | 2020-05-27 22:58:51 -0400 | |
|---|---|---|
| committer | 2020-05-27 22:58:51 -0400 | |
| commit | 640f0d1cec7cea180b44eac82624e7f382f5da4b (patch) | |
| tree | c2b4a3ca8c3799e0701407f432cafe95c8e37512 /src/common/memory_detect.h | |
| parent | Merge pull request #3961 from Morph1984/bgra8_srgb (diff) | |
| parent | Fix macOS code and change "Swapfile" to "Swap" (diff) | |
| download | yuzu-640f0d1cec7cea180b44eac82624e7f382f5da4b.tar.gz yuzu-640f0d1cec7cea180b44eac82624e7f382f5da4b.tar.xz yuzu-640f0d1cec7cea180b44eac82624e7f382f5da4b.zip | |
Merge pull request #3954 from Morph1984/log-memory-amount
main: Log host system memory parameters
Diffstat (limited to 'src/common/memory_detect.h')
| -rw-r--r-- | src/common/memory_detect.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/common/memory_detect.h b/src/common/memory_detect.h new file mode 100644 index 000000000..a73c0f3f4 --- /dev/null +++ b/src/common/memory_detect.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | // Copyright 2020 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "common/common_types.h" | ||
| 8 | |||
| 9 | namespace Common { | ||
| 10 | |||
| 11 | struct MemoryInfo { | ||
| 12 | u64 TotalPhysicalMemory{}; | ||
| 13 | u64 TotalSwapMemory{}; | ||
| 14 | }; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * Gets the memory info of the host system | ||
| 18 | * @return Reference to a MemoryInfo struct with the physical and swap memory sizes in bytes | ||
| 19 | */ | ||
| 20 | const MemoryInfo& GetMemInfo(); | ||
| 21 | |||
| 22 | } // namespace Common \ No newline at end of file | ||