memory: Implement protecting multiple VMAs (#2484)

* Implement protecting multiple VMAs

A handful of games expect this to work, and updated versions of Grand Theft Auto V crash if it doesn't work.

* Clang
This commit is contained in:
Stephen Miller 2025-02-21 00:28:47 -06:00 committed by GitHub
parent 14717b8ecb
commit 54a1694a2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 16 deletions

View file

@ -198,7 +198,9 @@ public:
int QueryProtection(VAddr addr, void** start, void** end, u32* prot);
int Protect(VAddr addr, size_t size, MemoryProt prot);
s32 Protect(VAddr addr, size_t size, MemoryProt prot);
s64 ProtectBytes(VAddr addr, VirtualMemoryArea vma_base, size_t size, MemoryProt prot);
int VirtualQuery(VAddr addr, int flags, ::Libraries::Kernel::OrbisVirtualQueryInfo* info);