mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[PR #615] [MERGED] memory: Fixes for direct memory allocation. #1668
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#1668
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/615
Author: @squidbus
Created: 8/27/2024
Status: ✅ Merged
Merged: 8/28/2024
Merged by: @raphaelthegreat
Base:
main← Head:memory📝 Commits (3)
ca9360amemory: Size direct memory based on requested flexible memory.f48b92ememory: Guard against OrbisProcParam without an OrbisKernelMemParam.66114c9memory: Account for alignment in direct memory suitability checks and add more debugging.📊 Changes
5 files changed (+60 additions, -22 deletions)
View changed files
📝
src/core/libraries/kernel/memory_management.cpp(+5 -4)📝
src/core/libraries/kernel/memory_management.h(+1 -1)📝
src/core/linker.cpp(+13 -5)📝
src/core/memory.cpp(+35 -9)📝
src/core/memory.h(+6 -3)📄 Description
Sizes the direct memory area based on the flexible memory size requested by the game.
SCE_KERNEL_MAIN_DMEM_SIZEis set to the total of direct memory and flexible memory, and the flexible memory is removed from that total to arrive at the direct memory size.sceKernelGetDirectMemorySize()replaces most uses of the constant to make sure the proper calculated size is used.This PR also fixes some areas where requested alignment was not taken into account for the size of an available direct memory region.
This fixes some games hitting
Unable to find free direct memory areain https://github.com/shadps4-emu/shadPS4/issues/601🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.