[Kernel/Thread] Changed incorrect thread stack location (Fixes Nier)
This commit is contained in:
parent
c1389cc5b1
commit
b7bd389a27
|
@ -220,7 +220,7 @@ void XThread::InitializeGuestObject() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool XThread::AllocateStack(uint32_t size) {
|
bool XThread::AllocateStack(uint32_t size) {
|
||||||
auto heap = memory()->LookupHeap(0x40000000);
|
auto heap = memory()->LookupHeap(0x70000000);
|
||||||
|
|
||||||
auto alignment = heap->page_size();
|
auto alignment = heap->page_size();
|
||||||
auto padding = heap->page_size() * 2; // Guard page size * 2
|
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;
|
auto actual_size = size + padding;
|
||||||
|
|
||||||
uint32_t address = 0;
|
uint32_t address = 0;
|
||||||
if (!heap->AllocRange(0x40000000, 0x7F000000, actual_size, alignment,
|
if (!heap->AllocRange(0x70000000, 0x7F000000, actual_size, alignment,
|
||||||
kMemoryAllocationReserve | kMemoryAllocationCommit,
|
kMemoryAllocationReserve | kMemoryAllocationCommit,
|
||||||
kMemoryProtectRead | kMemoryProtectWrite, false,
|
kMemoryProtectRead | kMemoryProtectWrite, false,
|
||||||
&address)) {
|
&address)) {
|
||||||
|
@ -252,7 +252,7 @@ bool XThread::AllocateStack(uint32_t size) {
|
||||||
|
|
||||||
void XThread::FreeStack() {
|
void XThread::FreeStack() {
|
||||||
if (stack_alloc_base_) {
|
if (stack_alloc_base_) {
|
||||||
auto heap = memory()->LookupHeap(0x40000000);
|
auto heap = memory()->LookupHeap(0x70000000);
|
||||||
heap->Release(stack_alloc_base_);
|
heap->Release(stack_alloc_base_);
|
||||||
|
|
||||||
stack_alloc_base_ = 0;
|
stack_alloc_base_ = 0;
|
||||||
|
|
Loading…
Reference in New Issue