mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #2997] [MERGED] Core: More Memory Cleanup & Fixes #3137
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#3137
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/2997
Author: @StevenMiller123
Created: 5/27/2025
Status: ✅ Merged
Merged: 5/29/2025
Merged by: @georgemoralis
Base:
main← Head:memory-fixes-once-more📝 Commits (10+)
1c0945eOnly perform GPU memory mapping when GPU can access itc59bb4fReserve fixese205a7dBetter sceKernelMmap2faa5acMajor refactorf085265Accurate phys_addr for non-direct mappings55099c0Properly handle GPU access rights78a28a0Update memory.cppfb7b90eUpdate memory.h3c734e7Update memory.cpp2c55d01Update memory.cpp📊 Changes
4 files changed (+189 additions, -177 deletions)
View changed files
📝
src/core/libraries/kernel/memory.cpp(+68 -38)📝
src/core/libraries/kernel/memory.h(+9 -9)📝
src/core/memory.cpp(+108 -120)📝
src/core/memory.h(+4 -10)📄 Description
The main change of this PR is completely removing our
PoolReserveandReservefunctions inCore::Memory. Both of these functions were effectively re-implementations ofMapMemorywith minor changes, since all three functions are different uses of themmapsyscall.Instead of constantly updating all three separately, it's easier to group all behavior in one function with additional checks where we need to behave slightly differently.
I've also added proper error handling in
posix_mmap, added proper conditional rasterizer memory mapping logic based on protection values, and fixed a few other edge cases I've noticed in testing.I'm opening this as a draft for now, as I need to make some more minor cleanup/style commits, and these changes need proper testing before any merges.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.