mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-27 08:46:03 +03:00
[PR #1085] [MERGED] core/memory: Pooled memory implementation #1919
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#1919
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/1085
Author: @polybiusproxy
Created: 9/26/2024
Status: ✅ Merged
Merged: 9/29/2024
Merged by: @georgemoralis
Base:
main← Head:core/memory-pool📝 Commits (1)
f62e647core/memory: Pooled memory implementation📊 Changes
12 files changed (+301 additions, -11 deletions)
View changed files
📝
src/common/alignment.h(+12 -0)📝
src/core/libraries/kernel/file_system.cpp(+2 -1)📝
src/core/libraries/kernel/libkernel.cpp(+21 -1)📝
src/core/libraries/kernel/memory_management.cpp(+98 -0)📝
src/core/libraries/kernel/memory_management.h(+7 -0)📝
src/core/libraries/kernel/thread_management.cpp(+9 -1)📝
src/core/libraries/save_data/save_backup.cpp(+1 -1)📝
src/core/libraries/save_data/save_memory.cpp(+1 -1)📝
src/core/libraries/videoout/driver.cpp(+1 -1)📝
src/core/memory.cpp(+129 -0)📝
src/core/memory.h(+19 -4)📝
src/video_core/amdgpu/liverpool.cpp(+1 -1)📄 Description
Pooled memory is, under the hood, direct memory partitioned in 64 KiB blocks, with the difference that developers don't have to be aware of physical addresses and only care about the virtual address space, which can make allocations easier for the developer.
The memory pool can be expanded (direct memory is allocated for pool usage and can no longer be used as normal direct memory), reserved (reserved area must be aligned to 2MB or a multiple of it), committed, and decommitted.
This PR lacks memory pool batching and getting block statistics, but I haven't seen any game using these.
Frequently used by newer revisions of Unreal Engine.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.