VERY experimental Nintendo Switch 2 emulator
C++
core: hle: kernel: init_slab_setup: Move CalculateSlabHeapGapSize to global namespace.
bunnei1494a66aa3f6
diff --git a/src/core/hle/kernel/init/init_slab_setup.cpp b/src/core/hle/kernel/init/init_slab_setup.cppindex 4e60f08297..b0f773ee09 100644--- a/src/core/hle/kernel/init/init_slab_setup.cpp+++ b/src/core/hle/kernel/init/init_slab_setup.cpp@@ -107,6 +107,12 @@ VAddr InitializeSlabHeap(Core::System& system, KMemoryLayout& memory_layout, VAdreturn start + size;}+size_t CalculateSlabHeapGapSize() {+ constexpr size_t KernelSlabHeapGapSize = 2_MiB - 296_KiB;+ static_assert(KernelSlabHeapGapSize <= KernelSlabHeapGapsSizeMax);+ return KernelSlabHeapGapSize;+}+} // namespaceKSlabResourceCounts KSlabResourceCounts::CreateDefault() {@@ -137,12 +143,6 @@ void InitializeSlabResourceCounts(KernelCore& kernel) {}}-size_t CalculateSlabHeapGapSize() {- constexpr size_t KernelSlabHeapGapSize = 2_MiB - 296_KiB;- static_assert(KernelSlabHeapGapSize <= KernelSlabHeapGapsSizeMax);- return KernelSlabHeapGapSize;-}-size_t CalculateTotalSlabHeapSize(const KernelCore& kernel) {size_t size = 0;