summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-10-29 22:46:39 +0200
committerbunnei <bunneidev@gmail.com>2022-11-04 05:17:06 +0100
commitf76b4417e6b705137dffbed0ee0b0d47af00e24a (patch)
tree51bacd745df3fc390ffe7014a62d77f12093d553 /src/core/hle
parentcore: hle: kernel: Add KPageTableManager. (diff)
downloadyuzu-f76b4417e6b705137dffbed0ee0b0d47af00e24a.tar
yuzu-f76b4417e6b705137dffbed0ee0b0d47af00e24a.tar.gz
yuzu-f76b4417e6b705137dffbed0ee0b0d47af00e24a.tar.bz2
yuzu-f76b4417e6b705137dffbed0ee0b0d47af00e24a.tar.lz
yuzu-f76b4417e6b705137dffbed0ee0b0d47af00e24a.tar.xz
yuzu-f76b4417e6b705137dffbed0ee0b0d47af00e24a.tar.zst
yuzu-f76b4417e6b705137dffbed0ee0b0d47af00e24a.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/k_page_buffer.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_page_buffer.h b/src/core/hle/kernel/k_page_buffer.h
index aef06e213..cfedaae61 100644
--- a/src/core/hle/kernel/k_page_buffer.h
+++ b/src/core/hle/kernel/k_page_buffer.h
@@ -11,6 +11,16 @@
namespace Kernel {
+class KernelCore;
+
+class KPageBufferSlabHeap : protected impl::KSlabHeapImpl {
+public:
+ static constexpr size_t BufferSize = PageSize;
+
+public:
+ void Initialize(Core::System& system);
+};
+
class KPageBuffer final : public KSlabAllocated<KPageBuffer> {
public:
explicit KPageBuffer(KernelCore&) {}
@@ -21,8 +31,6 @@ public:
private:
[[maybe_unused]] alignas(PageSize) std::array<u8, PageSize> m_buffer{};
};
-
-static_assert(sizeof(KPageBuffer) == PageSize);
-static_assert(alignof(KPageBuffer) == PageSize);
+static_assert(sizeof(KPageBuffer) == KPageBufferSlabHeap::BufferSize);
} // namespace Kernel