summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/init/init_slab_setup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/init/init_slab_setup.h')
-rw-r--r--src/core/hle/kernel/init/init_slab_setup.h43
1 files changed, 43 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..a8f7e0918
--- /dev/null
+++ b/src/core/hle/kernel/init/init_slab_setup.h
@@ -0,0 +1,43 @@
+// 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 KernelCore;
+class KMemoryLayout;
+} // namespace Kernel
+
+namespace Kernel::Init {
+
+struct KSlabResourceCounts {
+ static KSlabResourceCounts CreateDefault();
+
+ 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(KernelCore& kernel);
+size_t CalculateTotalSlabHeapSize(const KernelCore& kernel);
+void InitializeSlabHeaps(Core::System& system, KMemoryLayout& memory_layout);
+
+} // namespace Kernel::Init