aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/physical_memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-08-21 12:10:10 -0400
committerGitHub <noreply@github.com>2019-08-21 12:10:10 -0400
commitb4a8cfbd00863032fe4b4ed0145cfe1711b9317d (patch)
tree96d2ef5ae4b54857e2fd9b0dae5cb867acf30f7f /src/core/hle/kernel/physical_memory.h
parentd654b3d82eed3093957223b17db12875c7752280 (diff)
parentfebb88efc43ae171cc2880651b0665614c586504 (diff)
Merge pull request #2748 from FernandoS27/align-memory
VM_Manager: Align allocated host physical memory to 256bytes
Diffstat (limited to 'src/core/hle/kernel/physical_memory.h')
-rw-r--r--src/core/hle/kernel/physical_memory.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/hle/kernel/physical_memory.h b/src/core/hle/kernel/physical_memory.h
new file mode 100644
index 000000000..090565310
--- /dev/null
+++ b/src/core/hle/kernel/physical_memory.h
@@ -0,0 +1,19 @@
+// Copyright 2019 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "common/alignment.h"
+
+namespace Kernel {
+
+// This encapsulation serves 2 purposes:
+// - First, to encapsulate host physical memory under a single type and set an
+// standard for managing it.
+// - Second to ensure all host backing memory used is aligned to 256 bytes due
+// to strict alignment restrictions on GPU memory.
+
+using PhysicalMemory = std::vector<u8, Common::AlignmentAllocator<u8, 256>>;
+
+} // namespace Kernel