mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[Memory] Adjust allocation range in 64k virtual range
Previosly there was no consideration of cutted space for XPS and MMIO
This commit is contained in:
parent
413d60bf54
commit
d532d8eb61
|
|
@ -871,9 +871,18 @@ bool BaseHeap::Alloc(uint32_t size, uint32_t alignment,
|
||||||
*out_address = 0;
|
*out_address = 0;
|
||||||
size = xe::round_up(size, page_size_);
|
size = xe::round_up(size, page_size_);
|
||||||
alignment = xe::round_up(alignment, page_size_);
|
alignment = xe::round_up(alignment, page_size_);
|
||||||
|
|
||||||
|
// TODO(Gliniak): Find better way to deal with this!
|
||||||
|
// Because 0x3XXXXXX and 0x7XXXXXX is used strictly as place for thread stacks
|
||||||
|
// 0x3 is probably for system threads and 0x7 for title threads
|
||||||
uint32_t heap_virtual_guest_offset = 0;
|
uint32_t heap_virtual_guest_offset = 0;
|
||||||
if (heap_type_ == HeapType::kGuestVirtual) {
|
if (heap_type_ == HeapType::kGuestVirtual) {
|
||||||
heap_virtual_guest_offset = 0x10000000;
|
heap_virtual_guest_offset = 0x10000000;
|
||||||
|
|
||||||
|
// Adjust for 64k pages region, to prevent having a bit too little memory
|
||||||
|
if (page_size_ == 0x10000) {
|
||||||
|
heap_virtual_guest_offset = 0x0F000000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t low_address = heap_base_;
|
uint32_t low_address = heap_base_;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue