mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 04:10:06 +00:00
kernel/vm_manager: Remove unnecessary heap_used data member
This isn't required anymore, as all the kernel ever queries is the size of the current heap, not the total usage of it.
This commit is contained in:
parent
586cab6172
commit
52980df1aa
@ -806,7 +806,7 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
|
||||
return RESULT_SUCCESS;
|
||||
|
||||
case GetInfoType::TotalHeapUsage:
|
||||
*result = process->VMManager().GetTotalHeapUsage();
|
||||
*result = process->VMManager().GetCurrentHeapSize();
|
||||
return RESULT_SUCCESS;
|
||||
|
||||
case GetInfoType::IsVirtualAddressMemoryEnabled:
|
||||
|
@ -285,7 +285,6 @@ ResultVal<VAddr> VMManager::HeapAllocate(u64 size) {
|
||||
return mapping_result.Code();
|
||||
}
|
||||
|
||||
heap_used = size;
|
||||
return MakeResult<VAddr>(heap_region_base);
|
||||
}
|
||||
|
||||
@ -303,7 +302,6 @@ ResultCode VMManager::HeapFree(VAddr target, u64 size) {
|
||||
return result;
|
||||
}
|
||||
|
||||
heap_used -= size;
|
||||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
@ -596,6 +594,7 @@ void VMManager::InitializeMemoryRegionRanges(FileSys::ProgramAddressSpaceType ty
|
||||
|
||||
heap_region_base = map_region_end;
|
||||
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;
|
||||
@ -690,10 +689,6 @@ u64 VMManager::GetTotalMemoryUsage() const {
|
||||
return 0xF8000000;
|
||||
}
|
||||
|
||||
u64 VMManager::GetTotalHeapUsage() const {
|
||||
return heap_used;
|
||||
}
|
||||
|
||||
VAddr VMManager::GetAddressSpaceBaseAddress() const {
|
||||
return address_space_base;
|
||||
}
|
||||
|
@ -418,9 +418,6 @@ public:
|
||||
/// Gets the total memory usage, used by svcGetInfo
|
||||
u64 GetTotalMemoryUsage() const;
|
||||
|
||||
/// Gets the total heap usage, used by svcGetInfo
|
||||
u64 GetTotalHeapUsage() const;
|
||||
|
||||
/// Gets the address space base address
|
||||
VAddr GetAddressSpaceBaseAddress() const;
|
||||
|
||||
@ -639,8 +636,5 @@ private:
|
||||
// The end of the currently allocated heap. This is not an inclusive
|
||||
// end of the range. This is essentially 'base_address + current_size'.
|
||||
VAddr heap_end = 0;
|
||||
|
||||
// Indicates how many bytes from the current heap are currently used.
|
||||
u64 heap_used = 0;
|
||||
};
|
||||
} // namespace Kernel
|
||||
|
Loading…
Reference in New Issue
Block a user