mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Make memory locking optional (mlock, VirtualLock).
Fix desired locking operation (to fix "sudo" memory). It was discovered that some systems have outdated configuration. With too tight limit, it's almost impossible to lock anything in memory.
This commit is contained in:
parent
dcbe8ef5f4
commit
d1ee7c651f
4 changed files with 20 additions and 7 deletions
|
|
@ -773,7 +773,11 @@ namespace vm
|
|||
|
||||
perf_meter<"PAGE_LCK"_u64> perf1;
|
||||
|
||||
utils::memory_lock(g_base_addr + addr, size);
|
||||
if (!utils::memory_lock(g_sudo_addr + addr, size))
|
||||
{
|
||||
vm_log.error("Failed to lock memory. Consider increasing your system limits.\n"
|
||||
"addr=0x%x, size=0x%x, shm=%d, shm:[f=%d,l=%u]", addr, size, +!!shm, shm ? shm->flags() : 0, shm ? shm->info : 0);
|
||||
}
|
||||
}
|
||||
|
||||
bool page_protect(u32 addr, u32 size, u8 flags_test, u8 flags_set, u8 flags_clear)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue