mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-24 23:36:00 +03:00
[PR #4058] Calculate flex memory size #3905
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#3905
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/4058
Author: @par274
Created: 2/20/2026
Status: 🔄 Open
Base:
main← Head:calculate-flex-memory-size📝 Commits (10+)
6df7bearework flexible memory usage trackinge14ae0cexclude trampoline from code mapping2ca77d0need sleep52e462bclang-format89171d8map and register host trampoline for x86_64 patchingc5e401dclang-format (I always forget this)7e2af62avoid std::prev(begin())da725d9System modules should not consume the game's flexible memoryf459e8bMerge remote-tracking branch 'upstream' into calculate-flex-memory-sizecdec57aoptimize: unnecessary overhead📊 Changes
3 files changed (+252 additions, -13 deletions)
View changed files
📝
src/core/memory.cpp(+183 -5)📝
src/core/memory.h(+58 -5)📝
src/core/module.cpp(+11 -3)📄 Description
Based on: https://github.com/shadps4-emu/shadPS4/pull/4055#issuecomment-3930957339
I'm calculating flexible memory accounting based on VMM; module code is counted towards the flexible quota; host-side trampoline region is not counted.
This can solve some startup problems in games like Uncharted 4 and TLOU2.
I'm still learning process, ttrampoline will probably cause problems in other games.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.