From b7bd389a27e4d404b1b834caad863a00137a03e1 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Wed, 29 Jul 2020 21:14:02 +0200 Subject: [PATCH] [Kernel/Thread] Changed incorrect thread stack location (Fixes Nier) --- src/xenia/kernel/xthread.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xenia/kernel/xthread.cc b/src/xenia/kernel/xthread.cc index 5216d882c..866fa8a7a 100644 --- a/src/xenia/kernel/xthread.cc +++ b/src/xenia/kernel/xthread.cc @@ -220,7 +220,7 @@ void XThread::InitializeGuestObject() { } bool XThread::AllocateStack(uint32_t size) { - auto heap = memory()->LookupHeap(0x40000000); + auto heap = memory()->LookupHeap(0x70000000); auto alignment = heap->page_size(); auto padding = heap->page_size() * 2; // Guard page size * 2 @@ -228,7 +228,7 @@ bool XThread::AllocateStack(uint32_t size) { auto actual_size = size + padding; uint32_t address = 0; - if (!heap->AllocRange(0x40000000, 0x7F000000, actual_size, alignment, + if (!heap->AllocRange(0x70000000, 0x7F000000, actual_size, alignment, kMemoryAllocationReserve | kMemoryAllocationCommit, kMemoryProtectRead | kMemoryProtectWrite, false, &address)) { @@ -252,7 +252,7 @@ bool XThread::AllocateStack(uint32_t size) { void XThread::FreeStack() { if (stack_alloc_base_) { - auto heap = memory()->LookupHeap(0x40000000); + auto heap = memory()->LookupHeap(0x70000000); heap->Release(stack_alloc_base_); stack_alloc_base_ = 0;