mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #2080] [MERGED] Unmap Fixes #2477
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2477
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/2080
Author: @StevenMiller123
Created: 1/7/2025
Status: ✅ Merged
Merged: 1/8/2025
Merged by: @georgemoralis
Base:
main← Head:fix-reserved-unmaps📝 Commits (5)
09b683bFix unmapping reserved memory7e70278Fix bug with unmapping before reservead2ceddClangf2be980Ignore free memory pages2be3e93Handle pooled memory📊 Changes
1 file changed (+16 additions, -8 deletions)
View changed files
📝
src/core/memory.cpp(+16 -8)📄 Description
This PR fixes several memory issues I've noticed.
type != VMAType::Reserved.type == VMAType::Free.UnmapMemoryImpldoesn't properly handle pooled memory. PoolReserved memory can either be reserved or decommitted memory, either case isn't mapped in address_space. Additionally, Pooled memory is GPU mapped. My solution is adding those relevant checks so we don't run into any strange Windows-specific issues.vma.type == VMAType::Freewould fail. This is because, while theUnmapMemoryImplcall modifies vma_map, the vma retrieved before that call is not modified. To fix this, I add an extra FindVMA call after the unmap.This should fix cases of:
And some cases of:
Credits to @red-prig for providing relevant information.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.