summaryrefslogtreecommitdiff
path: root/src/common/memory_detect.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-05-27 22:58:51 -0400
committerGitHub <noreply@github.com>2020-05-27 22:58:51 -0400
commit640f0d1cec7cea180b44eac82624e7f382f5da4b (patch)
treec2b4a3ca8c3799e0701407f432cafe95c8e37512 /src/common/memory_detect.h
parent630fc12d4efcdcc006573d4c3e54c7024cf8fdee (diff)
parentb2af3049185567dfb48aab18957221198c8eab09 (diff)
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.h22
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 @@
+// Copyright 2020 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "common/common_types.h"
+
+namespace Common {
+
+struct MemoryInfo {
+ u64 TotalPhysicalMemory{};
+ u64 TotalSwapMemory{};
+};
+
+/**
+ * Gets the memory info of the host system
+ * @return Reference to a MemoryInfo struct with the physical and swap memory sizes in bytes
+ */
+const MemoryInfo& GetMemInfo();
+
+} // namespace Common \ No newline at end of file