summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/init/init_slab_setup.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-04-03 07:16:58 +0200
committerbunnei <bunneidev@gmail.com>2021-05-06 01:40:50 +0200
commitd3d0f2f451041a23214978ee224051a8575cf119 (patch)
tree5f9be86d04edce5035b53c8b2105d483a2637f43 /src/core/hle/kernel/init/init_slab_setup.h
parenthle: kernel: Refactor out various KThread std::shared_ptr usage. (diff)
downloadyuzu-d3d0f2f451041a23214978ee224051a8575cf119.tar
yuzu-d3d0f2f451041a23214978ee224051a8575cf119.tar.gz
yuzu-d3d0f2f451041a23214978ee224051a8575cf119.tar.bz2
yuzu-d3d0f2f451041a23214978ee224051a8575cf119.tar.lz
yuzu-d3d0f2f451041a23214978ee224051a8575cf119.tar.xz
yuzu-d3d0f2f451041a23214978ee224051a8575cf119.tar.zst
yuzu-d3d0f2f451041a23214978ee224051a8575cf119.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/init/init_slab_setup.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/core/hle/kernel/init/init_slab_setup.h b/src/core/hle/kernel/init/init_slab_setup.h
new file mode 100644
index 000000000..6418b97ac
--- /dev/null
+++ b/src/core/hle/kernel/init/init_slab_setup.h
@@ -0,0 +1,42 @@
+// Copyright 2021 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+namespace Core {
+class System;
+} // namespace Core
+
+namespace Kernel {
+class KMemoryLayout;
+} // namespace Kernel
+
+namespace Kernel::Init {
+
+struct KSlabResourceCounts {
+ size_t num_KProcess;
+ size_t num_KThread;
+ size_t num_KEvent;
+ size_t num_KInterruptEvent;
+ size_t num_KPort;
+ size_t num_KSharedMemory;
+ size_t num_KTransferMemory;
+ size_t num_KCodeMemory;
+ size_t num_KDeviceAddressSpace;
+ size_t num_KSession;
+ size_t num_KLightSession;
+ size_t num_KObjectName;
+ size_t num_KResourceLimit;
+ size_t num_KDebug;
+ size_t num_KAlpha;
+ size_t num_KBeta;
+};
+
+void InitializeSlabResourceCounts();
+const KSlabResourceCounts& GetSlabResourceCounts();
+
+size_t CalculateTotalSlabHeapSize();
+void InitializeSlabHeaps(Core::System& system, KMemoryLayout& memory_layout);
+
+} // namespace Kernel::Init