[PR #557] [MERGED] core/kernel: Miscellaneous memory fixes #1633

Closed
opened 2026-02-27 21:13:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/557
Author: @polybiusproxy
Created: 8/24/2024
Status: Merged
Merged: 8/26/2024
Merged by: @raphaelthegreat

Base: mainHead: kernel/memory-fixes


📝 Commits (5)

  • 20ef4cc core/libraries/kernel: Fix inaccurate direct memory size
  • 7cd7323 core/memory: Fix available dmem query on non-free dmem areas
  • 902d279 core/kernel: return ENOMEM if memory area size is zero
  • be1994f core/kernel: Fix returns on sceKernelAvailableDirectMemorySize
  • a6b3ecc core/memory: Remove unneeded size alignment

📊 Changes

3 files changed (+19 additions, -5 deletions)

View changed files

📝 src/core/libraries/kernel/memory_management.cpp (+13 -4)
📝 src/core/libraries/kernel/memory_management.h (+1 -1)
📝 src/core/memory.cpp (+5 -0)

📄 Description

This PR:

  • Changes the direct memory size to be accurate (SCE_KERNEL_MAIN_DMEM_SIZE aka sceKernelGetDirectMemorySize).
  • Fixes an inaccuracy where sceKernelAvailableDirectMemorySize also accounted for non-free direct memory areas.
  • Fixed an inaccuracy where sceKernelAvailableDirectMemorySize did not return ENOMEM.

Fixes Rock Band 4 (CUSA02084) not booting on version 2.21.
Fixes DRAGON BALL FighterZ (CUSA09072) memory allocations (at @StevenMiller123).
Fixes JoJo's Bizarre Adventure: Eyes of Heaven (CUSA04909) not booting.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/557 **Author:** [@polybiusproxy](https://github.com/polybiusproxy) **Created:** 8/24/2024 **Status:** ✅ Merged **Merged:** 8/26/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `kernel/memory-fixes` --- ### 📝 Commits (5) - [`20ef4cc`](https://github.com/shadps4-emu/shadPS4/commit/20ef4cc4207f75756a26d3b3cdb36dafbd5dc4ef) core/libraries/kernel: Fix inaccurate direct memory size - [`7cd7323`](https://github.com/shadps4-emu/shadPS4/commit/7cd7323f98f85df7658d25ec384085705261955e) core/memory: Fix available dmem query on non-free dmem areas - [`902d279`](https://github.com/shadps4-emu/shadPS4/commit/902d279c0a545d1f4895a406bb56d9a707010fbe) core/kernel: return ENOMEM if memory area size is zero - [`be1994f`](https://github.com/shadps4-emu/shadPS4/commit/be1994f1097b246a7eaa073fc0bf4474bc5f292e) core/kernel: Fix returns on `sceKernelAvailableDirectMemorySize` - [`a6b3ecc`](https://github.com/shadps4-emu/shadPS4/commit/a6b3ecca8932606ae35465f6e6ff0c3c32e1c70c) core/memory: Remove unneeded size alignment ### 📊 Changes **3 files changed** (+19 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/kernel/memory_management.cpp` (+13 -4) 📝 `src/core/libraries/kernel/memory_management.h` (+1 -1) 📝 `src/core/memory.cpp` (+5 -0) </details> ### 📄 Description This PR: - Changes the direct memory size to be accurate (SCE_KERNEL_MAIN_DMEM_SIZE aka `sceKernelGetDirectMemorySize`). - Fixes an inaccuracy where `sceKernelAvailableDirectMemorySize` also accounted for non-free direct memory areas. - Fixed an inaccuracy where `sceKernelAvailableDirectMemorySize` did not return `ENOMEM`. Fixes Rock Band 4 ([CUSA02084](https://github.com/shadps4-emu/shadps4-game-compatibility/issues/144)) not booting on version 2.21. Fixes DRAGON BALL FighterZ ([CUSA09072](https://github.com/shadps4-emu/shadps4-game-compatibility/issues/43)) memory allocations (at @StevenMiller123). Fixes JoJo's Bizarre Adventure: Eyes of Heaven ([CUSA04909](https://github.com/shadps4-emu/shadps4-game-compatibility/issues/291)) not booting. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:13:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#1633
No description provided.