WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@StevenMiller123
Copy link
Collaborator

This PR includes proper checks for dmem aliasing (implemented in a naive way for now), and adds three flags to Core::MemoryMapFlags for determining memory type.
For mmap, flag Anon signifies mappings with no backing (flex mem), flag Stack is for mapping stack memory, and flag Void is for reserving memory. These can all be verified through decompiling libkernel, as it uses these flags for mmap calls in the relevant kernel functions.

This PR needs regression testing, primarily in titles with SDK version at or above 2.50. I don't have access to the wider range of games I own, so I can't really test this myself.

Would also be nice to have someone test Red Dead Redemption 2, it is the only game I've seen sceKernelEnableDmemAliasing called in, but I can't test it right now.

@georgemoralis
Copy link
Collaborator

rdr2 seems ok so :D

@georgemoralis georgemoralis merged commit 65f0b07 into shadps4-emu:main Dec 8, 2025
8 checks passed
@StevenMiller123 StevenMiller123 deleted the quick-mem-fixes branch December 11, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants