feat(libc): implement sceLibcMspaceReallocalign #107
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/107"
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?
Imported from boykopovar/AnyPS5. Originally posted by asimplestray on 2026-09-28T22:15:35Z.
What
Implements
sceLibcMspaceReallocalign(handle, pointer, size, alignment)(was the only missing function of the mspace family a real game needs at load: the relinked Hades binary died withundefined symbol: p6lrRW8-MLYunderBIND_NOW).Semantics mirror the existing neighbors: null pointer behaves like
Memalign, zero size frees, invalid (zero/non-power-of-two) alignment reportsEINVAL, an in-place resize keeps the pointer only when capacity and effective alignment (floored at 16, likeMemalign) both hold, otherwise allocate-copy-release preservingmin(used, size)bytes.Identified by hashing candidate Sony names with the PS5 NID suffix against the game's import NIDs (same method as #106).
Tested
Linux (GCC 16,
BUILD_TESTING=ON): full build,ctest56/56 pass, including extendedmspace_tests(aligned fresh alloc, grow with content preservation, invalid alignments, free-on-zero). The lazy-bound Hades binary advances past this symbol at load.Checklist
main; no other open PR implements the same functions (checked #77-86, #98, #101, #102, #106).mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-09-28T22:43:49Z.
Progress report (
4c2b052→02b431e)📈 System libraries: 67.23% (+0.01%, +1 implemented functions)
✅ 1 implemented
sceLibcMspaceReallocalign_nid_postfix