From 9a36d8600c0b263b4b3861b64051a4f62b4251d2 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sun, 17 May 2020 14:45:12 -0400 Subject: main: Log host system memory parameters Logs both physical memory and swapfile sizes, this is useful for support. --- src/common/memory_detect.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/common/memory_detect.h (limited to 'src/common/memory_detect.h') 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 -- cgit v1.2.3