mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-31 14:35:19 +00:00
Clean logic
FindDmemArea guarantees that the first dmem area we check contains search_start. Any dmem areas beyond the first one will be entirely past search_start, so checking against it in the loop is unnecessary.
This commit is contained in:
parent
ae39cad847
commit
2e175db733
@ -151,9 +151,7 @@ PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, size_t size,
|
|||||||
dmem_area++;
|
dmem_area++;
|
||||||
|
|
||||||
// Update local variables based on the new dmem_area
|
// Update local variables based on the new dmem_area
|
||||||
mapping_start = search_start > dmem_area->second.base
|
mapping_start = Common::AlignUp(dmem_area->second.base, alignment);
|
||||||
? Common::AlignUp(search_start, alignment)
|
|
||||||
: Common::AlignUp(dmem_area->second.base, alignment);
|
|
||||||
mapping_end = mapping_start + size;
|
mapping_end = mapping_start + size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user