mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
perf(libc): release exact resident mappings without repeated queries
This commit is contained in:
1 parent
6447ed1ed7
commit
97c11bcb94
1 file changed
+5
@@ -798,6 +798,11 @@ private:
|
||||
forgetClean(address, end);
|
||||
breakRun(address);
|
||||
breakRun(end);
|
||||
if (const auto run = residentRuns.find(address); run != residentRuns.end() && run->second.end == end) {
|
||||
evict(run);
|
||||
if (!VirtualFree(reinterpret_cast<void*>(address), bytes, MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER)) fail("release private guest memory");
|
||||
return;
|
||||
}
|
||||
for (auto cursor = address; cursor < end;) {
|
||||
const auto memory = query(cursor);
|
||||
if (memory.State == MEM_RESERVE) {
|
||||
|
||||
Reference in new issue
Block a user