mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-07-09 17:25:37 -06:00
Properly handle search_end restrictions in sceKernelAllocateDirectMemory (#4600)
This commit is contained in:
parent
dcd036d261
commit
5ddd87d742
@ -256,7 +256,7 @@ PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, u64 size, u6
|
||||
mapping_end = mapping_start + size;
|
||||
}
|
||||
|
||||
if (dmem_area == dmem_map.end()) {
|
||||
if (dmem_area == dmem_map.end() || mapping_end > search_end) {
|
||||
// There are no suitable mappings in this range
|
||||
LOG_ERROR(Kernel_Vmm, "Unable to find free direct memory area: size = {:#x}", size);
|
||||
return -1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user