aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-27 17:04:06 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-27 17:04:06 -0400
commitdce3adbc4cae486e2f3c080b995669d6db5ef58f (patch)
tree638ec3ffef50441c7229160ee20b0fd9423ee271 /src/core/hle/kernel
parent2835fec7fc66e1a1659710de8eddf2dfe67e20f9 (diff)
Switch 2: window image sizes, queue semaphores, built-in fonts, memory budget
- gsv 1510 CalculateRequirements: block-linear size/alignment for window images. - nvhost-gpu: Switch 2 channel event 7 is a real (unsignalled) event. - Puller mirrors NVN2 queue semaphore releases into the page the CPU and GPU wait on (the first two-page nx2:gpu region); EDEN_NX2_METHOD_TRACE logs methods. - pl:u 2000/2010 GetBuiltInFontSharedMemory/GetBuiltInFontData serve plain TTF copies of the shared fonts. - Switch 2 processes count the alias region in their max memory, so the game's nninitStartup heap (total - 6.3 GiB) has room for its sound heap. - gdbrsp.py: interrupt, threads, selthread, hits, continue_async, sleep.
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/k_process.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp
index 27d1b1bfc4..4aac818b77 100644
--- a/src/core/hle/kernel/k_process.cpp
+++ b/src/core/hle/kernel/k_process.cpp
@@ -1261,6 +1261,13 @@ Result KProcess::LoadFromMetadata(KernelCore& kernel, const FileSys::ProgramMeta
// Assign remaining properties.
m_ideal_core_id = metadata.GetMainThreadCore();
+ // Switch 2 applications get more memory than a 64-bit heap region holds (nninitStartup sizes
+ // its heap as total memory minus ~6.3 GiB), so count the alias region as well, bounded by the
+ // pool through the resource limit.
+ if (metadata.IsSwitch2()) {
+ m_max_process_memory = m_page_table.GetHeapRegionSize() + m_page_table.GetAliasRegionSize();
+ }
+
// Set up emulation context.
this->InitializeInterfaces(kernel);