mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-21 17:47:52 -05:00
kernel/vm_manager: Rename 'new map' to 'stack'
Provides a more accurate name for the memory region and also disambiguates between the map and new map regions of memory, making it easier to understand.
This commit is contained in:
@ -625,7 +625,7 @@ void VMManager::UpdatePageTableForVMA(const VirtualMemoryArea& vma) {
|
||||
void VMManager::InitializeMemoryRegionRanges(FileSys::ProgramAddressSpaceType type) {
|
||||
u64 map_region_size = 0;
|
||||
u64 heap_region_size = 0;
|
||||
u64 new_map_region_size = 0;
|
||||
u64 stack_region_size = 0;
|
||||
u64 tls_io_region_size = 0;
|
||||
|
||||
u64 stack_and_tls_io_end = 0;
|
||||
@ -665,7 +665,7 @@ void VMManager::InitializeMemoryRegionRanges(FileSys::ProgramAddressSpaceType ty
|
||||
aslr_region_end = aslr_region_base + 0x7FF8000000;
|
||||
map_region_size = 0x1000000000;
|
||||
heap_region_size = 0x180000000;
|
||||
new_map_region_size = 0x80000000;
|
||||
stack_region_size = 0x80000000;
|
||||
tls_io_region_size = 0x1000000000;
|
||||
break;
|
||||
default:
|
||||
@ -685,15 +685,15 @@ void VMManager::InitializeMemoryRegionRanges(FileSys::ProgramAddressSpaceType ty
|
||||
heap_region_end = heap_region_base + heap_region_size;
|
||||
heap_end = heap_region_base;
|
||||
|
||||
new_map_region_base = heap_region_end;
|
||||
new_map_region_end = new_map_region_base + new_map_region_size;
|
||||
stack_region_base = heap_region_end;
|
||||
stack_region_end = stack_region_base + stack_region_size;
|
||||
|
||||
tls_io_region_base = new_map_region_end;
|
||||
tls_io_region_base = stack_region_end;
|
||||
tls_io_region_end = tls_io_region_base + tls_io_region_size;
|
||||
|
||||
if (new_map_region_size == 0) {
|
||||
new_map_region_base = stack_and_tls_io_begin;
|
||||
new_map_region_end = stack_and_tls_io_end;
|
||||
if (stack_region_size == 0) {
|
||||
stack_region_base = stack_and_tls_io_begin;
|
||||
stack_region_end = stack_and_tls_io_end;
|
||||
}
|
||||
|
||||
if (tls_io_region_size == 0) {
|
||||
@ -890,21 +890,21 @@ bool VMManager::IsWithinMapRegion(VAddr address, u64 size) const {
|
||||
return IsInsideAddressRange(address, size, GetMapRegionBaseAddress(), GetMapRegionEndAddress());
|
||||
}
|
||||
|
||||
VAddr VMManager::GetNewMapRegionBaseAddress() const {
|
||||
return new_map_region_base;
|
||||
VAddr VMManager::GetStackRegionBaseAddress() const {
|
||||
return stack_region_base;
|
||||
}
|
||||
|
||||
VAddr VMManager::GetNewMapRegionEndAddress() const {
|
||||
return new_map_region_end;
|
||||
VAddr VMManager::GetStackRegionEndAddress() const {
|
||||
return stack_region_end;
|
||||
}
|
||||
|
||||
u64 VMManager::GetNewMapRegionSize() const {
|
||||
return new_map_region_end - new_map_region_base;
|
||||
u64 VMManager::GetStackRegionSize() const {
|
||||
return stack_region_end - stack_region_base;
|
||||
}
|
||||
|
||||
bool VMManager::IsWithinNewMapRegion(VAddr address, u64 size) const {
|
||||
return IsInsideAddressRange(address, size, GetNewMapRegionBaseAddress(),
|
||||
GetNewMapRegionEndAddress());
|
||||
bool VMManager::IsWithinStackRegion(VAddr address, u64 size) const {
|
||||
return IsInsideAddressRange(address, size, GetStackRegionBaseAddress(),
|
||||
GetStackRegionEndAddress());
|
||||
}
|
||||
|
||||
VAddr VMManager::GetTLSIORegionBaseAddress() const {
|
||||
|
Reference in New Issue
Block a user